How to use the @tarojs/mobx-common.mapStoreToProps function in @tarojs/mobx-common

To help you get started, we’ve selected a few @tarojs/mobx-common examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NervJS / taro / packages / taro-mobx-h5 / src / inject.js View on Github external
render () {
      const originProps = mapStoreToProps(grabStoresFn, this.props)
      return createElement(sourceComponent, {
        ...originProps,
        ref: ref => {
          originProps.ref && originProps.ref(ref)
          if (ref) {
            this.__observeInstance = ref
          }
        }
      })
    }
github NervJS / taro / packages / taro-mobx-rn / src / inject.js View on Github external
render () {
      const originProps = mapStoreToProps(grabStoresFn, this.props)
      return createElement(sourceComponent, {
        ...originProps,
        ref: ref => {
          originProps.ref && originProps.ref(ref)
          if (ref) {
            this.__observeInstance = ref
          }
        }
      })
    }
github NervJS / taro / packages / taro-mobx / src / inject.js View on Github external
constructor (props, isPage) {
      super(Object.assign(...arguments, mapStoreToProps(grabStoresFn, props)), isPage)
    }
github NervJS / taro / packages / taro-mobx / src / inject.js View on Github external
_constructor () {
      Object.assign(this.props, mapStoreToProps(grabStoresFn, this.props))
      super._constructor && super._constructor(this.props)
    }
  }