🌐 API Integration Example

Fetch API with Ruby (Opal) + Stimulus + Vite

Users from JSONPlaceholder API

Loading users...

💡 About This Example

This example demonstrates:

  • API Integration: Fetching data from JSONPlaceholder API using fetch()
  • Loading States: Visual feedback while data loads
  • Error Handling: Graceful error messages on failure
  • Dynamic Rendering: Creating DOM elements from API data
  • Nested Data: Fetching user details and posts on click

API: JSONPlaceholder - Free fake API for testing and prototyping