Skip to content
v1.0.0
Docs
Ecosystem
Playground
Search
⌘ K
Docs
Ecosystem
Playground
Get started
Introduction
Quick start
Project structure
Learn
The mental model
Forgiving reactivity
State
Derived values
Effects
Control flow
Lists
Context
Suspense and resources
Data fetching
Error handling
Transitions
Styling
Build a todo app
1. Set up the project
2. Write the first component
3. Render a list
4. Add todos with a form
5. Filters and derived state
6. Persistence and effects
8. Server render and build
Guides
State with useStore
Effects and lifecycle
Overview
Components run once
useEffect
useRenderEffect
onMount
onCleanup
untrack
batch and flushSync
createRoot, dispose and detached roots
getOwner and runWithOwner
Order of execution
What runs on the server
What disposes what
Diagnostics
Common mistakes
Stable handlers and reactions
Reference
Control flow in depth
Lists and keys
Server rendering
Accessibility
Performance
Bundle size
Benchmarks
Security
Extending ShadowJS
MDX and Markdown
Patterns
Dark mode
Debounced search
Optimistic updates
Infinite list
Sortable table
Form validation
Modal dialog
Accessible tabs
Keyboard shortcuts
Undo and redo
How it works
Reactivity model
Ownership
Scheduler and timing
Fine-grained rendering
Reconciliation
Hydration keys
Tooling
The compiler
The Vite plugin
create-shadow-app
Configuration
Migrate
Choose a path
From React
From React Router
From Preact
From Next.js
From Solid
From Socket.IO
From shadcn/ui and Radix
From Tailwind
Reference
Overview
Diagnostics
@shadow-js/core
@shadow-js/core/extend
@shadow-js/web
@shadow-js/web/extend
@shadow-js/web/server
@shadow-js/router
@shadow-js/compiler
@shadow-js/vite
create-shadow-app
Menu
Docs
Guides
Effects and lifecycle
Reference
[
]
previous and next page
Reference
Reference in the Effects and lifecycle guide.
For agents
Updated
2026-10-20
useEffect
,
useRenderEffect
,
onMount
,
onCleanup
untrack
,
batch
,
flushSync
createRoot
,
getOwner
,
runWithOwner
,
Owner
State
,
Error handling
Concepts:
Ownership
,
Scheduler and timing
Previous
Effects and lifecycle: Stable handlers and reactions
Next
Control flow in depth
On this page
Copy page as Markdown