Examples
Examples
Live interactive demos live on the page that teaches them. Each one is a real Preactile component mounted into the docs site:
Overview: the facade, then a live counter (
StatefulComponent).Components: typed props and composition (
Buttoninside a click counter).Stateful Components:
initialStateandsetStateon a counter.Conduit Integration: a todo app with
Conduit.make, lensed subscriptions, andconduit.unsafe(action).Element DSL: attributes, events, and
whenfor conditional content.Styling:
CssClassplus inlineA.styledeclarations.
Setup and bundling (sbt-splice, mount code) is on Mounting. Host React is on Embedding in React; host Preact is on Embedding in Preact.