Packages Overview
Stew-Lang provides a set of virtual stew/* packages designed to offer high-level functionality within your <goscript client> blocks while minimizing the TinyGo binary weight.
π¦ stew/data
Access URL parameters, route state, and server-side data synchronized via the Store.
View details βπ stew/io
Interact with the user through browser alerts, prompts, confirmations, and the debug console.
View details βπ§ stew/nav
Manage client-side navigation, URL changes without reloads (Morphing), and browser history.
View details βπΎ stew/storage
Manipulate LocalStorage and SessionStorage reactively with automatic synchronization.
View details βπ₯ stew/state
The heart of reactivity: Signals, Effects, and Auto-Tracking for living interfaces.
View details ββ¨ stew/ui
Control visual state: page title, scrolling, focus, and imperative CSS class manipulation.
View details ββ¨οΈ stew/event
Listen to global events (keyboard, window, network) for advanced user interactions.
View details βπͺ stew/cookies
Manage client-side cookies (sessions, preferences) without complex string parsing.
View details βπ stew/anim
Drive smooth animations using the browser's native Web Animations API.
View details βπ stew/js
Bridge for executing raw JS code and loading external third-party libraries.
View details βπ stew/net
Perform type-safe HTTP requests using Fetch, with reactive loading states.
View details β"Explicit Import, Lightweight Binary"
By default, a Stew Wasm bundle is extremely minimalist. No package is included if it's not used. This allows you to precisely control your page weight.
βοΈ Performance Impact
Some packages (like stew/data which requires JSON handling) can increase the Wasm binary size by several hundred KB. Use them with discernment.