▲ | bookofcooks 2 days ago | |||||||
It actually depends on the page. Some pages, I don't use the SolidJS JSX, just its plain-js state primitives. For other page, I'll use full-blown SolidJS (with JSX and everything) for like a popup. Example: https://pasteboard.co/hY35xM7VbATG.png Now, how I specifically embed SolidJS, its pretty simple, I have my entrypoint files for specific pages: assets/admin-edit-book.tsx assets/admin-edit-song.tsx assets/single-worship.tsx assets/worship-edit.tsx Then I have a 30-line build script that invokes esbuild along with esbuild-plugin-solid (to compile JSX to plain-old html, no fancy virtual dom) to compile the scripts into javascript. I can share the build script if you'd like. It helps that SolidJS is so self-contained that it makes such a setup trivial. | ||||||||
▲ | brokegrammer 2 days ago | parent [-] | |||||||
Sure, the build script would be insightful. Removing the virtual dom sounds cool. I've been sleeping on SolidJS because I've always stuck with React after being disappointed by other frameworks. If it allows me to keep my server rendered pages, SolidJS might be what I've been looking for. | ||||||||
|