react-native-navigation的迁移库

PropRegistry.js 296B

12345678910111213141516
  1. class PropRegistry {
  2. constructor() {
  3. this.registry = {};
  4. }
  5. save(screenInstanceId = '', passProps = {}) {
  6. this.registry[screenInstanceId] = passProps;
  7. }
  8. load(screenInstanceId = '') {
  9. return this.registry[screenInstanceId] || {};
  10. }
  11. }
  12. module.exports = new PropRegistry();