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

PromiseState.refresh should return a new PromiseState #149

Closed
nfcampos opened this issue Sep 19, 2016 · 2 comments
Closed

PromiseState.refresh should return a new PromiseState #149

nfcampos opened this issue Sep 19, 2016 · 2 comments

Comments

@nfcampos
Copy link
Contributor

PromiseState.refresh should return a new PromiseState because this way a shallowEqual comparison of the props in the wrapped component erroneously returns true even though the PromiseState changed

@nfcampos
Copy link
Contributor Author

(and the current behaviour goes against the docs ;) https://github.com/heroku/react-refetch/blob/master/docs/api.md#promisestate)

Properties should be treated as read-only and immutable. If the Promise enters a new state, a new PromiseState object is created.

@ryanbrainard
Copy link
Contributor

Good catch! I can put together a quick fix

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