Interactive examples showcasing Zignal's reactive state management capabilities.
npm install
npm run dev
-
Option 1: Direct Upload
- Zip the entire
counter-app
folder - Go to StackBlitz
- Click "Import project" and upload the zip
- Zip the entire
-
Option 2: GitHub Integration
- Push this code to a GitHub repository
- Go to
https://stackblitz.com/github/YOUR_USERNAME/YOUR_REPO/tree/main/counter-app
-
Option 3: One-Click Deploy
- Use the StackBlitz URL:
https://stackblitz.com/fork/github/YOUR_USERNAME/YOUR_REPO/tree/main/counter-app
- Use the StackBlitz URL:
Basic counter implementation using Zignal's core functionality.
- Counter that saves state to localStorage or sessionStorage
- Toggle between storage types to see the difference
- Demonstrates persistence across page reloads
- Counter synchronized across browser tabs and windows
- Uses BroadcastChannel API for real-time sync
- Open multiple tabs to see it in action
- Multi-key counter that syncs with URL query parameters
- Two variants: with and without initial values in URL
- Demonstrates URL state management
- React 19 - UI framework
- TypeScript - Type safety
- Vite - Build tool and dev server
- React Router - Client-side routing
- Zignal - Reactive state management (from npm)
createZignal()
- Core reactive statewrite()
- Persistent state with localStorage/sessionStoragebroadcast()
- Cross-tab synchronizationbuildQueryString()
- URL state synchronization
Once deployed to StackBlitz, you can:
- Share the live URL with others
- Embed examples in documentation
- Fork and modify for your own projects
- Test cross-tab sync by opening multiple browser tabs
- Uses published Zignal packages from npm for easy deployment
- All Zignal packages are automatically installed from the registry
- Ready for StackBlitz, CodeSandbox, or any online IDE