Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any repercussions of accessing state directly? #61

Open
fhadsheikh opened this issue Aug 15, 2018 · 1 comment
Open

Any repercussions of accessing state directly? #61

fhadsheikh opened this issue Aug 15, 2018 · 1 comment

Comments

@fhadsheikh
Copy link

The docs say to use redux-bees state selectors but for a case when all we want to do is check if an entity exists in state, is there any issue checking in state without a selector?

@MrLeebo
Copy link

MrLeebo commented Sep 7, 2018

Generally you want to prefer selectors over direct access because a future release may make changes to the structure of the redux state. I'd recommend implementing your own selector function instead of doing the direct access in your mapStateToProps, that way if the data structure changes, you only have one place in your code that needs fixing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants