How to use the remx/react.connect function in remx

To help you get started, we’ve selected a few remx 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 wix-incubator / react-dataflow-example / _old / PostsScreen.js View on Github external
}

// which props do we want to inject, given the global store state?
// always use selectors here and avoid accessing the state directly
//function mapStateToProps(state) {
//  const [postsById, postsIdArray] = postsSelectors.getPosts(state);
//  return {
//    postsById,
//    postsIdArray,
//    topicsByUrl: topicsSelectors.getSelectedTopicsByUrl(state),
//    currentFilter: postsSelectors.getCurrentFilter(state),
//    currentPost: postsSelectors.getCurrentPost(state)
//  };
//}

export default connect(PostsScreen);
github wix-incubator / react-dataflow-example / src / containers / App.tsx View on Github external
class App extends React.Component {
  render() {
    return (
      <div>
        {
          topicsStore.getters.isFinishedTopicsSelection() ?
            &lt; PostsScreen /&gt;
            :
            &lt; TopicsScreen /&gt;
        }
      </div>
    );
  }
}

export default connect(App);

remx

Opinionated mobx

MIT
Latest version published 2 months ago

Package Health Score

79 / 100
Full package analysis