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

Why do not use symbol? #321

Open
bigGoodMan opened this issue Aug 24, 2018 · 1 comment
Open

Why do not use symbol? #321

bigGoodMan opened this issue Aug 24, 2018 · 1 comment

Comments

@bigGoodMan
Copy link

export default handleActions({ [type['INCREMENT']]: (state) => ({...state,value: state.value + 1}), [type['INCREMENT_IF_ODD']]: (state) => ({...state, value: (state.value % 2 !== 0) ? state.value + 1 : state.value}), [type['DECREMENT']]: (state) => ({...state, value: state.value - 1}) }, { value: 2 })
type['INCREMENT'] is Symbol() , it's false.but type['INCREMENT'] is string, it's true.Why?

@phsantiago
Copy link

Some time ago I had this same idea.
Here is the response: reduxjs/redux#4

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