Skip to main content
Tevm integrates with Svelte using stores and SvelteKit’s load functions for server-side data fetching.

Installation

Basic Store Pattern

Create reactive stores for Ethereum data:

SvelteKit Load Functions

Fetch data server-side with SvelteKit:

Reactive Polling

Poll for block updates:

Derived Stores

Compute values from multiple stores:

Custom Async Store

Reusable async store factory:

Actions for Transactions

Use Svelte actions for form submissions:

Context API

Share provider across components:

Svelte 5 Runes

With Svelte 5 runes:

Next Steps