Skip to main content
Laravel Chorus provides powerful React hooks and Chorus Actions that make it effortless to build real-time, offline-capable applications. This guide covers everything from basic setup to advanced patterns.

Setup

1. Add the Chorus Provider

Wrap your app’s layout file with the Chorus provider:

2. Use Data and Actions in Components

Use Chorus hooks for data access and generated action functions for writes:

Core Hooks

useTable Hook

The primary hook provides data access for synchronized tables:

Chorus Actions for Writes

Use generated action functions for all write operations:

useOffline Hook

Monitor and handle offline state:

Error Handling and Optimistic Updates

Chorus Actions automatically handle optimistic updates with rollback:

Real-time Collaboration

Build collaborative features with presence indicators:

Error Handling

Rejected Operations Handling

Handle and display rejected operations:

Next Steps

Vue Integration

Learn about Vue.js integration (Coming Soon)

Chorus Actions

Master server-side Chorus Actions

Concepts Deep Dive

Understand Chorus core concepts

Advanced Features

Explore advanced configuration options

You now have everything you need to build powerful real-time React applications with Laravel Chorus. The combination of optimistic updates, offline support, and real-time synchronization will deliver an exceptional user experience.