Standards/Conventions for Solid/SolidStart project setup
Hey Coders, still new to SolidJS and trying to wrap my head around overall project setup/dev workflow. I'm curious to know if there are any agreed upon conventions of project scaffolding, composition patterns, and overall best practices for both Solid & Solid Start.
Most information seems geared towards developers in or coming from React but I've been stuck in a bespoke JS framework for 6+ years. I don't have a frame of reference to the popular libraries out there so I'm just trying to fill in some knowledge gags. (e.g. usage of JSX-- thought it was tied to React only, not sure where JSX ends and SolidJSX begins). I would appreciate any input, opinions, recommended reading, watching, etc. The livestreams have been invaluable, and I'm super greatful Ryan takes the time to do those.
1 Reply
Scaffolding depends very much on what you intend to do. In any case, you can hardly go wrong with
pnpm create solid
and then selecting what you need based on your requirements. Solid-Start is for when you also need some server functionality, otherwise go classic solid. Vite is very much a given (in Solid-Start, you're using it through vinxi), as it is the go-to modern dev server / bundler setup. There's also no viable replacement as of now for vite-plugin-solid, which handles the transpilation in the server / bundler. It is using dom-expressions, which uses babel to compile JSX into templates and effects. Then you have a select choice of UX components (Ark, Corvu, Kobalte, Solid-UI, SUID) and primitives (solid-primitives).