SolidJS: The Complete Guide
SolidJS: The Complete Guide
A comprehensive guide to reactive web development with SolidJS and TypeScript
About the Book
Solid may seem simple on the surface, but its internal workings involve complex interactions that can sometimes be tricky to explain. I rewrote the book twice to find the right balance—enough depth to capture the complexities without overwhelming readers.
This book is the fruit of two years of arduous work. It is a comprehensive book that aims to teach you the ins and outs of Solid, covering its core principles, the inner workings, and the API. By the end of this book, you will have a thorough understanding of SolidJS to write efficient applications.
Personally, I’m not comfortable using tools without understanding their inner workings and intricacies. This book goes beyond just showing you how to use SolidJS; it explains the reasoning and underlying principles behind the library, helping you understand why certain approaches or features work the way they do. With this deeper comprehension, you’ll be well-equipped to build your own projects confidently.
Please scroll down to see the table of contents and explore the topics covered in detail.
Table of Contents
- Chapter 01: Introduction
- The Solid Version Used
- Contact and Feedback
- Requirements
- Trying Solid via Online Playground
- Creating a Project From a Template
- Note For React Developers
- Chapter 02: Setting Up a Development Environment
- Chapter 03: On SolidJS
- The Problem Solid Solves
- How Solid Works?
- Reactive Data
- Composable UI
- The Advantages of Solid Over Its Alternatives
- Chapter 04: How Solid’s Reactive System Works
- Observer Pattern
- The Essence of Reactive Core
- The Uses of Computations
- Chapter 05: Tracking State With Signals
- Overwriting the comparison logic
- Updating Signals
- Transforming Signals
- Destructuring Signals
- Batching Updates
- Chapter 06: Running Side-Effects with Effects
- Effects Can Be Nested
- Explicit Tracking
- Opting Out of Tracking
- Handling External Dependencies
- Chapter 07: Caching Values with Memos
- Chapter 08: Rules of JSX
- Elements Should Be Closed
- JSX Elements Can Be Nested
- Expressions Can Be Used Inside JSX Elements
- Elements Can Have Attributes
- Missing Attribute Values Default to
true
- Comments
- Whitespaces Are Trimmed
- Chapter 09: Composing User Interfaces
- Components Should Return A Single Root Element
- Components Accept Data Through Their
props
- Adding Static Types To Components
- Components Can Have Children
- How Components Are Rendered
- Solid runs fine-grained updates
- Conditional Rendering
- Reactive
props
- Props should be treated as
read-only
- Destructuring Props Changes The Rendering Order
- Best Practices
- Chapter 10: Working With Props
- Passing Data From Parent To Child
- Providing Controlled Access To Parent’s Data
- Passing Data From Child To Parent
- Sharing State Between Children
- Destructuring And Spreading Props
- Forwarding Multiple Props At Once
- Validating Props
- Passing Data From Parent To Child
- Chapter 11: Sharing Data Through the Context API
- How Context API Works
- Best Practices
- Chapter 12: Component Lifecycle
onMount
onCleanup
- Best Practices
- Chapter 13: Accessing DOM Nodes With
ref
- Forwarding Refs
- Using refs with external libraries
- Best Practices
- Chapter 14: Working with Computations
createComputed
createRenderEffect
createEffect
createMemo
createDeferred
createReaction
- Chapter 15: Handling Errors
ErrorBoundary
catchError
- Handling Asynchronous Errors
- Handling Event Handling Errors
- Chapter 16: Working with Owners
- Running functions with a given owner
- Running effects in asynchronous context
- Chapter 17: Styling Elements
- Using Inline Styles
- Applying Style Definitions
- Applying classes based on a condition
- Using The Imperative API
- Chapter 18: Reactive Utilities
batch
untrack
on
createRoot
mergeProps
splitProps
mapArray
andindexArray
observable
from
startTransition
anduseTransition
- Chapter 19: A Better Conditional Rendering
Switch
andMatch
- Chapter 20: Working with Lists
For
mapArray
- Index
indexArray
- Selecting Items with Selectors
- Chapter 21: Rendering Components Outside Component Hierarchy
- Chapter 22: Managing Complex States with Stores
- Accessing Data
- Updating Stores
- Limitations Related to Reactivity
- Store Utilities
produce
reconcile
unwrap
createMutable
- Chapter 23: Abstracting Behavior With Custom Directives
- Extending JSX Type With Custom Directives
- Using Imported Directives
- Chapter 24: Working with Asynchronous Data
- Decoupling Fetching From Rendering
- Chapter 25: Using Resource API for Data Fetching
- Info Object
- Resource Actions
- Handling Errors
- Chapter 26: Managing Loading States with Suspense
- Chapter 27: Achieving Better Consistency with Transitions
- Chapter 28: Coordinating Loading States
- Chapter 29: Code Splitting and Lazy Loading
- Chapter 30: Handling Events
- Using the
on
namespace - Using the
on:
Namespace - Using the
oncapture:
Namespace - Using Custom Properties
- Using Refs
- Using Custom Directives
- Passing Data to the Event Handlers
- Using the
- Chapter 31: Dynamically Rendering Components
- Chapter 32: Server Side Rendering
- Targeting The Server Context
- Targeting the Development Build
- Rendering A Solid App
- Chapter 33: Solid Without JSX
- Solid with Tagged Template Literals
- Solid with Hyperscript
- Drawbacks
- A1: Setting Development Environment Using Webpack
- Index
- About the Author
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them