facing reactivity issues
Trying to use solid.js with Strap cms, while it works, I need to first refresh my browser before it reflects the data. Any suggestions? Here’s the code:
https://docs.google.com/document/d/1EY9H80y_7nbnGSS-bZN-wX6fYtf9JS74YTGXxfWqyTs/edit?usp=sharing
Google Docs
solid.js support team
5 Replies
How are you rendering
App
into html? I see only export default App
.Also it would be much easier if you prepared minimal code with same issue. You can try using https://playground.solidjs.com/ and sharing with minified link
Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
By clicking this icon in top right corner
To begin with the
fetch
doesn't go in an effect.
Solid's reactivity is synchronous so async results need to cross the boundary into Solid's reactive tracking scope via createResource
in vanilla Solid or cache
/createAsync
if you are using solid-router
.
createResource
tutorial
Also setting signals inside an effect is generally a no-no, given that they only fire once state synchronization is complete and you want to avoid re-triggering the synchronization process from an effect as that is a common cause of infinite loops.SolidJS
Solid is a purely reactive library. It was designed from the ground up with a reactive core. It's influenced by reactive principles developed by previous libraries.
Any suggestions?Just some … https://stackblitz.com/edit/solidjs-templates-wntspj?file=src%2Fapp.tsx