LeetCode-OpenSource/ayanami

Remove setStateAction API

Closed this issue · 1 comments

Currently, setStateAction is used in Effect to update state, which is actually the responsibility of Reducer. Effect should only perform side-effects and dispatch actions. So please remove this API.

Yes, you are right. State shouldn't changed by Effect, it is Reducer's job. btw, PRs are welcome 😃