Inertia.js

Provider and switcher

Create resources/js/providers/theme-provider.tsx and resources/js/components/theme-switcher.tsx:

resources/js
├── components
│   └── theme-switcher.tsx
│   └── ...
├── providers
│   └── theme-provider.tsx
│   ...
Loading source code...

Usage

Add the provider to app.tsx:

Loading source code...
Design