You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NOTE: I'm not really a js/ts/frontend dev but encountered the bug. It might be I've just been using react-router wrong or in a weird way but seeing context providers break in a patch version was a bit surprising.
Just ran into the same issue with a context provider in a more complex setup. Haven't properly isolated it yet.
Seems like a state change in the provider value doesn't trigger a rendering of the route element anymore in my setup.
Worked until 7.1.3 , but not anymore since 7.1.4
I'm using React Router as a...
library
Reproduction
using
<...Context.Provider>
tags within the<Route element=... />
attr seems to be broken.npm install && npm run start
Issue can be worked around with:
<Context.Provider>
tags outside of the react router (not always feasible as you may have route-specific contexts)<Context.Provider>
tags into a separate react component that gets used in theelement
attr. (The/alt
route in the reproducing project).System Info
Used Package Manager
npm
Expected Behavior
Using react context providers within
<Route />
elements work, example from the reproducing code:expected result: count increases (react-router 7.1.3 or older)
Actual Behavior
actual result: count does not increase (react router 7.1.4 or newer)
The text was updated successfully, but these errors were encountered: