Skip to content
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(react-router): on initial load the router.state.status does not transition to "idle" #1559

Merged
merged 15 commits into from
May 4, 2024

Conversation

SeanCassiere
Copy link
Contributor

@SeanCassiere SeanCassiere commented May 4, 2024

On the initial load, the router's status does not transition back to "idle". This was working correctly prior to the 1.28.8 release.

Turns out, that the usePrevious hook used by the <RouterProvider>, wasn't actually storing the previous value so the conditions for firing the events were never met during the initial load.

Fixes #1552

@SeanCassiere SeanCassiere marked this pull request as ready for review May 4, 2024 03:39
Copy link

nx-cloud bot commented May 4, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit ce3248c. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

@SeanCassiere SeanCassiere marked this pull request as draft May 4, 2024 03:43
@SeanCassiere
Copy link
Contributor Author

Tanner mentioned this should be done in the router events and its possibly an event that's not firing correctly.

@SeanCassiere SeanCassiere marked this pull request as ready for review May 4, 2024 05:43
@SeanCassiere SeanCassiere merged commit fc2859d into main May 4, 2024
7 checks passed
@SeanCassiere SeanCassiere deleted the fix-1552 branch May 4, 2024 06:21
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.

router status never changes from "pending"
1 participant