Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Remove superfluous condition in GraphQL.shouldComponentUpdate() #653
While profiling a React Native app, I discovered a significant number of re-renders occurring for components decorated by the
The proposed change is small, but with great potential for regression. Here is my reasoning for why this is safe — please scrutinize carefully:
I cannot intuit why
If this change seems peaceful, I think it could be a boon to performance.
I'm not certain of a good way to test this, but am open to suggestions.
@jamesreggio I remember why we added this now. Its needed to update when other context change. See https://github.com/apollographql/react-apollo/blob/master/test/react-web/client/graphql/queries.test.tsx#L1567-L1637 as a test that fails when this is removed