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

fetchSuccess reducer should also accept hash array #71

Open
haotangio opened this issue Dec 13, 2017 · 0 comments
Open

fetchSuccess reducer should also accept hash array #71

haotangio opened this issue Dec 13, 2017 · 0 comments

Comments

@haotangio
Copy link

I'm using https://github.com/paularmstrong/normalizr to normalize my data.

However, after that I have to transform the result into array with Object.values(normalizedData) in other to use *_FETCH_SUCCESS action.

Can we make the reduce to do something like:

dispatch(userActionCreators.fetchSuccess({
   'id1': { name: 'name1', age: 1, id: 'id1' },
   'id2': { name: 'name2', age: 2, id: 'id2' },
}))

P/S: This change request may cause the conflict with current logic where we dispatch the event for only 1 item instead of array.

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