Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

graphql HOC does not inject immutable props #1121

Closed
evan-scott-zocdoc opened this issue Sep 21, 2017 · 1 comment
Closed

graphql HOC does not inject immutable props #1121

evan-scott-zocdoc opened this issue Sep 21, 2017 · 1 comment

Comments

@evan-scott-zocdoc
Copy link

Intended outcome:
when using graphql(query)(Component), I'd expect the injected data prop to be immutable so React components extending React.PureComponent would pick up the change and only re-render as necessary

Actual outcome:
props.data is not always immutably regenerated, and therefore will fail the PureComponent strict equality test for determining is a rerender is necessary

How to reproduce the issue:
Create a component extending PureComponent, and using the graphql() HOC with an uncached query. The child component should not update when the query resolves and the network status changes for the second time.

Version

@evan-scott-zocdoc
Copy link
Author

Nvm, it's actually this issue: #170

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

No branches or pull requests

1 participant