SolidJS
A fine-grained reactive UI library that looks like React but runs nothing like it.
17 bài học
SolidJS
Bắt đầu khóa họcGetting Started
- What is SolidJS?What SolidJS is, how fine-grained reactivity differs from a virtual DOM, and why that distinction matters.
- Setting Up a Solid ProjectScaffolding a SolidJS app with Vite, and what each generated file is actually doing.
- JSX in SolidWhy Solid's JSX looks like React's but compiles to something completely different under the hood.
Reactivity Fundamentals
- Signals — the Core PrimitivecreateSignal, the getter/setter pair that powers every piece of reactive state in Solid.
- Derived Values with createMemoWhen a plain derived function is enough, and when createMemo's caching actually earns its keep.
- Effects with createEffectRunning side effects in response to signal changes, and how automatic dependency tracking differs from React's dependency arrays.
Components & Props
Control Flow
- Conditional Rendering with ShowWhy Solid uses a <Show> component instead of JavaScript ternaries or && for conditional UI.
- Rendering Lists with ForWhy Solid has a dedicated <For> component instead of Array.map, and how it keeps list updates fast.
- Switch and MatchHandling more than two branches of conditional UI cleanly, without a chain of nested <Show> components.
Shared State
- Context in SolidSharing reactive state across the component tree with createContext and useContext, without prop drilling.
- Stores with createStoreManaging nested objects and arrays reactively with createStore, and why signals alone become clumsy for structured state.
- Updating Nested StateArray paths, produce, and reconcile — the tools for making complex store updates precise instead of clumsy.
Advanced & Best Practices
- Lifecycle and CleanuponMount and onCleanup — the two lifecycle hooks Solid needs, given that components only run once.
- Solid vs React: the Mental ModelA direct comparison of how Solid and React handle rendering, state, and updates, for developers translating knowledge between the two.
- Common Mistakes and Best PracticesA closing checklist of the Solid-specific pitfalls this course covered, and the habits that avoid them.