Created
October 9, 2019 17:45
-
-
Save alonbardavid/c1425bb3c2b89fa1e434d153536cbf05 to your computer and use it in GitHub Desktop.
Why use mobx gist8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// resource-view.js | |
const resourceById = createSelector([ | |
(state,props)=>state.resources[props.resourceId] | |
],(resource)=>resource) | |
const mapStateToProps = (state,ownProps) => ({ | |
...resourceById(state,ownProps) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment