Skip to content

perf(FieldArray): add shouldComponentUpdate to cut down on unnecessary renders#3784

Merged
jaredpalmer merged 2 commits intojaredpalmer:masterfrom
quantizor:replay-3295
May 26, 2023
Merged

perf(FieldArray): add shouldComponentUpdate to cut down on unnecessary renders#3784
jaredpalmer merged 2 commits intojaredpalmer:masterfrom
quantizor:replay-3295

Conversation

@quantizor
Copy link
Collaborator

Closes #3295

Jason Williams and others added 2 commits May 26, 2023 14:07
@vercel
Copy link

vercel bot commented May 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
formik-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 26, 2023 6:09pm

@codesandbox-ci
Copy link

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 2f2a60f:

Sandbox Source
Formik TypeScript Playground Configuration

@jaredpalmer jaredpalmer merged commit 22e236e into jaredpalmer:master May 26, 2023
@github-actions github-actions bot mentioned this pull request May 26, 2023
@JannesMeyer
Copy link

JannesMeyer commented May 30, 2023

@jaredpalmer @probablyup maybe this should've been a breaking change?

It broke our code because we have local state (a boolean popup toggle) that affects the FieldArray children.

@quantizor
Copy link
Collaborator Author

@jaredpalmer @probablyup maybe this should've been a breaking change?

It broke our code because we have local state (a boolean popup toggle) that affects the FieldArray children.

If you could provide a failing test/reproduction to work from in a new issue and tag me that would be appreciated

@quantizor quantizor deleted the replay-3295 branch May 30, 2023 11:09
@xconverge
Copy link

I also experienced breakage.

Adding this for now restored behavior.
shouldUpdate={() => true}

I will look at the logic a bit more in this PR to see if I can find a clue

quantizor pushed a commit that referenced this pull request May 31, 2023
…nnecessary renders (#3784)"

Unfortunately this change introduced some unwanted behavior in
deeply-composed JSX that relied on state other than that provided
by Formik.

This reverts commit 22e236e.
jaredpalmer pushed a commit that referenced this pull request May 31, 2023
* chore: add short contributor guide

* revert: "perf(FieldArray): add shouldComponentUpdate to cut down on unnecessary renders (#3784)"

Unfortunately this change introduced some unwanted behavior in
deeply-composed JSX that relied on state other than that provided
by Formik.

This reverts commit 22e236e.

* chore: fix playwright and update workflows

* chore: try a different fix

* chore: ignore webkit for now

* chore: add changeset for revert
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

Successfully merging this pull request may close these issues.

4 participants