Starting from:

$32+

SolidJS: The Complete Guide

A comprehensive guide to reactive web development with SolidJS and TypeScript

SolidJS: The Complete Guide is the most comprehensive resource available for learning SolidJS from the ground up.

Starting with the fundamentals of Solid’s reactivity system, you’ll explore signals, effects, memos, computations, and JSX rules before diving into advanced topics like context, stores, directives, asynchronous data handling, routing, and server-side rendering. Each chapter builds on the previous one, ensuring you gain both a conceptual understanding and practical experience.

The book also covers Solid Router and SolidStart, giving you practical insights into building modern, production-ready applications. Through plenty of hands-on examples, you’ll learn routing strategies, data fetching, authentication, server functions, and full-stack development patterns—everything you need to ship real-world SolidJS apps with confidence.

By the end, you’ll be ready to build scalable, reactive, and production-grade applications with SolidJS and SolidStart.

Print length: 534 pages.

The book includes more than 250 ready-to-run examples in its companion repository.

Payment & Security

All purchases are processed securely through Stripe, a trusted global payment platform. Stripe uses advanced encryption and is PCI DSS compliant, ensuring your payment information is always safe. We never store or have access to your credit card details, so you can buy with complete confidence.

Available in three different formats:

  • PDF
  • Epub
  • Azw3

Download Samples

https://github.com/solid-courses/solidjs-the-complete-guide/tree/main/samples

Table of Contents

  • 1. Introduction
    1. Code Examples
    2. Contact and Feedback
    3. Requirements
    4. Trying Solid via Online Playground
    5. Creating a Project From a Template
    6. Note For React Developers
  • 2. Setting Up a Development Environment
  • 3. On SolidJS
    1. The Problem Solid Solves
    2. How Solid Works?
      1. Reactive Data
      2. Composable UI
    3. The Advantages of Solid Over Its Alternatives
  • 4. How Solid’s Reactive System Works
    1. Observer Pattern
    2. The Essence of Reactive Core
      1. Improving Type Definitions for createComputation
      2. Deriving Reactive Values from Signals
    3. Uses of Computations
  • 5. Tracking State with Signals
    1. Overwriting the Comparison Logic
    2. Updating Signals
    3. Deriving Values
    4. Destructuring Signals
    5. Batching Updates
  • 6. Running Side-Effects with Effects
    1. Effects Can Be Nested
    2. Explicit Dependency Tracking
    3. Opting Out of Tracking
    4. Handling External Dependencies
  • 7. Caching Values with Memos
  • 8. Rules of JSX
    1. Elements Should Be Closed
    2. Elements Can Be Nested
    3. Expressions Can Be Used Inside JSX Elements
    4. Elements Can Have Attributes
    5. Missing Attribute Values Default to true
    6. Comments
    7. Whitespaces Are Trimmed
  • 9. Composing User Interfaces
    1. Components Should Return a Single Root Element
    2. Components Accept Data Through Their props
    3. Adding Static Types to Components
    4. Components Can Have Children
    5. How Components Are Rendered
    6. Conditional Rendering
    7. Reactive props
    8. Props Should Be Treated as Read-Only
    9. Destructuring Props Changes the Rendering Order
    10. Effects Are Executed After Rendering
    11. Best Practices
  • 10. Working with Props
    1. Passing Data From Parent to Child
    2. Sharing State Between Children
      1. Providing Controlled Access to Parent’s State
    3. Passing Data From Child to Parent
    4. Destructuring and Spreading Props
    5. Forwarding Multiple Props at Once
    6. Validating Props
  • 11. Sharing Data Through the Context API
    1. How Context API Works
    2. Best Practices
  • 12. Component Lifecycle
    1. onMount
    2. onCleanup
    3. Best Practices
  • 13. Accessing DOM Nodes With `ref`
    1. When ref Functions Execute
    2. Forwarding Refs
    3. Using Refs with External Libraries
    4. Best Practices
  • 14. Working with Computations
    1. createComputed
    2. createRenderEffect
    3. createEffect
    4. createMemo
    5. createDeferred
    6. createReaction
  • 15. Handling Errors
    1. ErrorBoundary
    2. catchError
    3. Handling Asynchronous Errors
  • 16. Working with Owners
    1. Accessing Currently Executing Computation
    2. Reactivity in Asynchronous Context
  • 17. Styling Elements
    1. Using Inline Styles
    2. Applying Style Definitions
    3. Applying Classes Conditionally
    4. Using the Imperative API
  • 18. Reactive Utilities
    1. batch
    2. untrack
    3. on
    4. createRoot
    5. mergeProps
    6. splitProps
      1. Why Use splitProps and mergeProps?
    7. mapArray and indexArray
    8. observable
    9. from
    10. startTransition and useTransition
  • 19. A Better Conditional Rendering
    1. Show
      1. Keyed Rendering
      2. Render Props
    2. Switch and Match
  • 20. Working with Lists
    1. For
    2. mapArray
    3. Index
    4. indexArray
    5. Selecting Items with Selectors
  • 21. Rendering Components Outside the Component Hierarchy
  • 22. Managing Complex States with Stores
    1. Accessing Data
    2. Updating Stores
    3. Limitations Related to Reactivity
    4. Store Utilities
      1. produce
      2. reconcile
      3. unwrap
      4. createMutable
  • 23. Abstracting Behavior With Custom Directives
    1. Extending JSX Type with Custom Directives
    2. Using Imported Directives
  • 24. Working with Asynchronous Data
    1. Decoupling Fetching From Rendering
  • 25. Using Resource API for Data Fetching
    1. Info Object
    2. Resource Actions
    3. Error Handling with Resources
      1. Display the Error in the UI
      2. Rethrow During Rendering
      3. Rethrow inside an Effect or Computated
    4. Paginated Data with Resources: A Book List Example
  • 26. Managing Loading States with Suspense
  • 27. Achieving Better Consistency with Transitions
  • 28. Coordinating Loading States
  • 29. Code Splitting and Lazy Loading
  • 30. Handling Events
    1. Using JSX Attributes with the on Prefix
    2. Using JSX Attributes with the on: Prefix
    3. Using Custom Properties
    4. Using Refs
    5. Using Custom Directives
    6. Passing Data to Event Handlers
  • 31. Dynamically Rendering Components
  • 32. Solid Without JSX
    1. Solid with Tagged Template Literals
    2. Solid with Hyperscript
    3. Drawbacks
  • 33. Server Side Rendering
    1. Issues With Single Page Applications
    2. SSR: Visible Content From the First Byte
    3. Three Rendering Approaches for SSR Applications
    4. renderToString - Synchronous HTML Generation
    5. renderToStringAsync - Asynchronous HTML Generation
    6. renderToStream - Streaming with Progressive Rendering
    7. Hydration: Breathing Life into Server-Rendered Pages
    8. Targeting the Server Context
    9. Targeting the Development Build
    10. Practical Guide to Server-Rendering
    11. Separating Application Shell from Client Logic
    12. Building a Full-Stack App with Express and Solid Router
  • 34. Solid Router
    1. Setting Up Development Environment
      1. Client-Only Development Environment
      2. SolidStart Development Environment
    2. Installing Solid Router
    3. Routing Strategies
    4. Anatomy of a URL
      1. Clean URLs
    5. Introducing the Router Component
      1. Error Handling Considerations
    6. Defining Routes
    7. Lazy Loading Route Components
    8. Matching Dynamic Paths
    9. Filtering Dynamic Paths
    10. Optional Parameters
    11. Catch-All Routes and Handling 404s
      1. Named Wildcards for Flexibility
      2. Wildcards Beyond Catch-All Routes
      3. Use Cases for Wildcard Routes
      4. Matching Multiple Paths in a Route
      5. Attaching Metadata
    12. Layouts
      1. Rendering Different Layouts Conditionally
      2. Rendering Different Layouts via Nested Routes
    13. Nested Routes
      1. Providing a Shared Layout
      2. Nested Routes via Configuration
    14. Alternative Routers
      1. Hash Mode Router
      2. Memory Router
    15. Linking and Navigation
      1. Using Anchor Elements
        1. Targeting New Tabs or Frames
        2. Adding Keyboard Shortcuts with accesskey
        3. Security Considerations for Anchor Elements
      2. Using the A Component
      3. Programmatic Navigation
      4. The redirect Function
        1. Using redirect in Queries and Actions
        2. Single Flight Mutations
        3. throw vs return
    16. Hosting Apps in Subdirectories
    17. Preloading
      1. Inside the preload Function
      2. Manually Preloading with usePreloadRoute
    18. Accessing Route Related Data
      1. Accessing URL Information with useLocation
      2. Managing Query Parameters with useSearchParams
      3. Extracting Route Parameters with useParams
      4. Matching Routes with useMatch and useCurrentMatches
    19. Displaying Transition Indicators
    20. Intercepting Route Changes with useBeforeLeave
    21. Fetching Async Data
    22. Deduplicated Data Fetching
    23. Updating Remote Data With Web Forms
      1. Working With Web Forms
      2. Collecting User Inputs and Performing Data Updates
      3. Providing Unique Names For Serialization
      4. Passing Arguments Directly
      5. Programmatically Invoking Actions
      6. Handling Form Errors
      7. Helper Functions
      8. Tracking Form Submissions with useSubmission and useSubmissions
    24. Reactive Forms with Authentication and Validation
  • 35. Isomorphic Apps with SolidStart
    1. Introducing SolidStart
    2. Project Setup & Configuration
    3. Project Structure
    4. Building Navigation with File-Based Routes
      1. Dynamic Parameters
      2. Optional Parameters
      3. Catch-All Routes
      4. Logical Naming for Cleaner File Organization
        1. Renaming index.tsx for Discoverability
        2. Using Folders for Logical Grouping
      5. Escaping Folder-Based Nesting
      6. Creating Shared Page Structures with Layouts
      7. Defining Layouts for Nested Routes
        1. Escaping Nested Layouts
    5. Serving Static Assets
      1. Using import Statements
    6. Styling Components
      1. Using Stylesheets
      2. Using CSS Modules
      3. CSS-in-JS
    7. Data Exchange Between the Server and Client
      1. Basic Data Fetching: API Endpoints
      2. Idiomatic Data Fetching: Server Functions
      3. Performing Server-Side Mutations: Server Actions
    8. Caching Data for Request Deduplication
    9. Preloading Data
    10. Pre-rendering Routes
    11. Registering API Endpoints
      1. Using the file router API
      2. Using application configuration
      3. Using a Middleware
      4. Using the GET function
    12. Accessing Server Events
    13. Managing <head> Elements
    14. Setting HTTP Headers and Status Codes
      1. Setting HTTP Headers
      2. Setting HTTP Status Codes
    15. Creating Client-Only Components
    16. Building Echoes: A Quote Management App with SolidStart
      1. Project Setup
      2. Application Structure and Routes
        1. Route Organization
        2. Protected Routes
        3. Public Routes
      3. Application Layout
      4. Styling
      5. Error Handling
      6. Fetching Data
      7. Updating Data
    17. Authentication and Authorization
      1. Notifications and Confirmation Dialogs
        1. Mounting the Client-Only Layers
        2. Notifications: Decoupled, Event-Driven Toasts
        3. Confirmation Dialogs: Explicit Consent for Destructive Actions
    18. Closing Thoughts
  • A1. Setting Development Environment Using Webpack
    1. Install Dependencies
    2. Configuring Webpack
    3. Configure the Webpack Dev Server
    4. Add TypeScript Support
    5. Add Eslint Support
    6. Create a Basic Application
  • About the Author