-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fix unnecessary rendering of FastField #2070
Conversation
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/jared/formik-docs/k0mxso22i |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 5da4bf3:
|
I tried my best to write a test that reproduces the problem, but it's really difficult, if not impossible in a "fake context". |
1c274c7
to
6e4a0cd
Compare
Whenever Context changes, shouldComponentUpdate is not called, which caused FastField to always re-render whenever Context changes This adds a wrapper around FastField that grabs the Context, and passes it down as props
6e4a0cd
to
72b5272
Compare
@jaredpalmer Can you take another look at this please? And possibly publish a new release including this and #2069 |
Publishing meow |
@jaredpalmer what is the status of that release? I went to look for the release attached to your comment above but I see the last release was 2.0.6, 17 days ago. |
Whenever Context changes, shouldComponentUpdate is not called, which caused FastField to always re-render whenever Context changes
This adds a wrapper around FastField that grabs the Context, and passes it down as props
Fixes #1974, #2042, #1759
May depend on #2069 to be entirely fixed