DEV Community

Discussion on: Gotchas when learning SolidJS with (p)react background

Collapse
 
ryansolid profile image
Ryan Carniato • Edited

Thanks for the feedback. Only the second issue is actually by design for Solid.

The first issue is a limit to component identification heuristic for Hot Module Loading found in the Vite starter(github.com/solidjs/solid-refresh). We need to do better here. It's basically thinks the hook is a component when you put it as the default export in a .tsx/.jsx file. This is good to point out and will be improved in the future.

I am not aware of the 3rd issue. It sounds like a bug. Maybe also due to Hot Module Loading. I've never seen but maybe just by chance but works fine in things like the playground: https://playground.solidjs.com/?hash=1947242128&version=1.2.5. Feel free to report any bugs you find on github or drop them in the discord.

Collapse
 
k1dv5 profile image
Kidus Adugna

Thank you Ryan, that clears it up. I'll investigate the third point further, under dev server and built. Thanks for the feedback!