
SolidStart Has a Free API — Heres How to Build Reactive Full-Stack Apps
SolidStart is the full-stack framework for SolidJS — giving you server functions, file-based routing, and fine-grained reactivity out of the box. Why SolidStart? Fine-grained reactivity : No virtual DOM, surgical updates Server functions : Call server code directly from components File-based routing : Automatic route generation SSR/SSG/CSR : Choose rendering strategy per route Vinxi-powered : Modern bundler with HMR Quick Setup npm init solid@latest my-app cd my-app && npm install && npm run dev File-Based Routing src/routes/ index.tsx -> / about.tsx -> /about posts/ index.tsx -> /posts [id].tsx -> /posts/:id Data Loading with createAsync import { createAsync , cache } from ' @solidjs/router ' ; const getPosts = cache ( async () => { ' use server ' ; return await db . post . findMany ({ orderBy : { createdAt : ' desc ' } }); }, ' posts ' ); export const route = { load : () => getPosts () }; export default function Posts () { const posts = createAsync (() => getPosts ()); return ( < ul
Continue reading on Dev.to Webdev
Opens in a new tab

