Essentials
Sprig essentials are a small set of composable primitives rather than a large component runtime:
- State: Core
signal()for scalar values; optionalcreateStore()fromsprig-framework/storefor plain object/array state. - Derivation:
computed()for a read-only derived getter. - Side effects:
effect()for tracked work, with a disposer. - Rendering:
h()or a compiled.sprigtemplate. - Lifetime:
createRoot()andonCleanup()for ownership and cleanup.
The guides below cover application setup, templates, and reactivity. Sprig does not provide Vue's Options API or Vue-compatible component lifecycle.