These examples demonstrate how to build interactive quizzes with Datastar, showing the progression from client-side to server-side functionality.
A quiz that handles all user interactions in the browser after initial page load. No additional server requests are made during quiz interaction. Demonstrates basic reactivity, computed values, and conditional rendering.
View ExampleAn enhanced quiz that makes additional server requests during interaction. Uses Server-Sent Events (SSE) to fetch questions from the server and update the UI in real-time. Demonstrates how Datastar bridges client and server functionality.
View Example