FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
project logo
jxnblkpreact-client-starter
Minimal Preact starter example with client-side hydration
Public
Like
1
preact-client-starter
Home
Code
5
App.tsx
HTML.tsx
README.md
client.ts
H
http.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
4/11/2025
README.md

Preact Client Starter

Minimal Preact starter example with client-side hydration

View Demo

How it works

The http.tsx file renders the HTML Preact component on the server. This component includes a <script> tag that requests the client.ts module in the browser. This module hydrates the <div id="app"> element with the App component to allow you to use client-side state.

Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.