Skip to content
This repository was archived by the owner on Sep 11, 2018. It is now read-only.

Improve createReducer #223

Merged
merged 2 commits into from
Dec 7, 2015
Merged

Improve createReducer #223

merged 2 commits into from
Dec 7, 2015

Conversation

Mistereo
Copy link
Contributor

@Mistereo Mistereo commented Dec 6, 2015

This change allows us to write reducers which depend on additional data as described here: reduxjs/redux#749 (comment)

This change allows us to write reducers which depend on additional data as described here: reduxjs/redux#749 (comment)
@dvdzkwsk
Copy link
Owner

dvdzkwsk commented Dec 6, 2015

Interesting. Would you mind adding a comment to link to that discussion above createReducer so people looking at the function understand the purpose of ...rest?

@Mistereo
Copy link
Contributor Author

Mistereo commented Dec 7, 2015

I've added comment, let me know if I need to correct the text (I'm not a native speaker).
I also wonder why we pass to reducer only payload from action?
If it's FSA I think there can be cases when we want to access meta or/and error properties.

@Mistereo Mistereo closed this Dec 7, 2015
@Mistereo Mistereo reopened this Dec 7, 2015
dvdzkwsk pushed a commit that referenced this pull request Dec 7, 2015
@dvdzkwsk dvdzkwsk merged commit a4a9b06 into dvdzkwsk:master Dec 7, 2015
@dvdzkwsk
Copy link
Owner

dvdzkwsk commented Dec 7, 2015

@Mistereo it was originally just a utility for my own use, and I only used it when it made sense. That said, I'll probably be changing it so it passes the entire action rather than just the payload.

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

Successfully merging this pull request may close these issues.

2 participants