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

Math.random is forbidden in redux paradigm #14

Open
HawkeyePierce89 opened this issue Oct 16, 2019 · 0 comments
Open

Math.random is forbidden in redux paradigm #14

HawkeyePierce89 opened this issue Oct 16, 2019 · 0 comments

Comments

@HawkeyePierce89
Copy link

id: Math.random().toString(36).substring(2),

the reducer must be pure. Given the same arguments, it should calculate the next state and return it. No surprises. No side effects. No API calls. No mutations. Just a calculation

https://redux.js.org/basics/reducers#handling-actions

@HawkeyePierce89 HawkeyePierce89 changed the title random is forbidden in redux paradigm Math.random is forbidden in redux paradigm Oct 16, 2019
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

1 participant