Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Fix forceUpdate() for RR6 data routes with loaders#2709

Merged
mattkubej merged 3 commits intomainfrom
fix/forceupdate-with-rr-data-routes
Jan 31, 2024
Merged

Fix forceUpdate() for RR6 data routes with loaders#2709
mattkubej merged 3 commits intomainfrom
fix/forceupdate-with-rr-data-routes

Conversation

@developit
Copy link
Contributor

@developit developit commented Jan 30, 2024

Description

React Router data routes don't render in a single pass, so forceUpdate() of a parent component does not force-update matched components. This means that React will bail out of rendering when it hits rootElement in TestWrapper because it is equal to the previous render.

@developit developit requested a review from a team as a code owner January 30, 2024 22:27
@developit developit requested a review from egjiri January 30, 2024 22:27
@melnikov-s
Copy link
Contributor

/snapit

@github-actions
Copy link
Contributor

🫰✨ Thanks @melnikov-s! Your snapshot has been published to npm.

Test the snapshot by updating your package.json with the newly published version:

yarn add @shopify/react-testing@0.0.0-snapshot-20240131005345

@mattkubej mattkubej merged commit 06874c6 into main Jan 31, 2024
@mattkubej mattkubej deleted the fix/forceupdate-with-rr-data-routes branch January 31, 2024 02:37
@shopify-shipit shopify-shipit bot temporarily deployed to production-gem July 5, 2024 16:32 Inactive
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants