Open
Description
Reproduction
- Go to the route
/test
. - Click on
click
- Check the developer console - it should work correctly - both
inside
+outside
change state - Change the code, add a space or something.... now after HMR
inside
is fine, butoutside
has the wrong state
When I move the BugContext from the route to a separate file, it starts working correctly.
https://stackblitz.com/edit/remix-run-remix-v7duwb?file=app%2Froutes%2Ftest.tsx
System Info
System:
OS: Linux 6.11 Arch Linux
CPU: (16) x64 AMD Ryzen 7 5800X 8-Core Processor
Memory: 24.47 GB / 31.27 GB
Container: Yes
Shell: 5.9 - /usr/bin/zsh
Binaries:
Node: 20.17.0 - ~/.nvm/versions/node/v20.17.0/bin/node
Yarn: 1.22.22 - /usr/bin/yarn
npm: 10.8.2 - ~/.nvm/versions/node/v20.17.0/bin/npm
pnpm: 9.9.0 - ~/.nvm/versions/node/v20.17.0/bin/pnpm
bun: 1.1.27 - ~/.bun/bin/bun
Browsers:
Brave Browser: 129.1.70.123
Chromium: 129.0.6668.89
npmPackages:
@remix-run/dev: ^2.13.1 => 2.13.1
@remix-run/node: ^2.13.1 => 2.13.1
@remix-run/react: ^2.13.1 => 2.13.1
@remix-run/serve: ^2.13.1 => 2.13.1
vite: ^5.1.0 => 5.4.3
Used Package Manager
npm
Expected Behavior
Context should works in children component
Actual Behavior
Context work only for children declareated inside route