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

Infer payloads from action creators when creating reducers #580

Open
sseppola opened this issue Jan 25, 2023 · 0 comments
Open

Infer payloads from action creators when creating reducers #580

sseppola opened this issue Jan 25, 2023 · 0 comments

Comments

@sseppola
Copy link
Contributor

I commonly see code that explicitly types both the state and action payload when creating a reducer, this is burdensome and can lead to bugs.

eg.

const aReducer = reducer<State, Payload>(customActionCreator, (_, payload) => ({...defaultState, ...payload}))
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