Search
Star
Feedback
Setup for Free
ยฉ 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Context lost on HMR - SolidJS
S
SolidJS
โข
2y ago
โข
26 replies
Tom
Context lost on HMR
I
'm having an issue with the state of a Solid context getting lost on HMR
.
This makes sense because the module that calls
createContext
createContext
is being reloaded
, and the call is a module level statement
, which is pretty normal I think
.
But from this
https://github.com/solidjs/solid-refresh/issues/15
it looks like solid
-refresh should know how to preserve the state
.
Is there some good practive that I
'm missing to make this work
?
GitHub
Contexts become undefined during HMR ยท Issue #15 ยท solidjs/solid-re...
It seems during HMR any useContext
(
) becomes undefined
, potentially breaking components that trust on a context being always unavailable or set up without defaults
, which in turn breaks the hot rel
.
.
.
SolidJS
Join
Solid is a declarative reactive Javascript library for creating user interfaces.
12,274
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Context and HMR
S
SolidJS / support
2y ago
useRouteData empty on HMR
S
SolidJS / support
3y ago