S
SolidJS9mo ago
Tuzemec

Context and HMR

Hi, I'm having a small issue with the combination of context consumer and HMR. Example here: https://stackblitz.com/edit/solidjs-templates-wf2avx?file=src%2FContextConsumer.tsx (The same happens locally too) Basically when you edit the ContextConsumer the context value is lost during HMR. Is that something expected? I found an old similar issues on github: https://github.com/solidjs/solid-refresh/issues/14 but I don't see a resolution. Am I missing something?
GitHub
Hot reload is not working! · Issue #14 · solidjs/solid-refresh
Describe the bug When i change some code in App.jsx, I need to manually refresh the browser page. I don't know if this is expected or not? But I would really like if the browser page refresh au...
2 Replies
lxsmnsyc
lxsmnsyc9mo ago
you have cyclic modules App is importing from ContextConsumer ContextConsumer is importing from App
Tuzemec
TuzemecOP9mo ago
Huh... got it. Moved the context out of App and it works as expected. Thanks!
Want results from more Discord servers?
Add your server