Source: sebastiandedeyne.com

Vite with Laravel: Using React
Vite supports JSX out of the box, so there are no additional steps to get started with React. However, you’ll probably want to enable React Refresh for a better development experience.

For example, if you’re working on modal that appears after clicking a button, you’d need to reopen that modal every time the page refreshes. With React Refresh, the modal will stay open after the code reloaded, because it’s able to remember the previous state. To enable React Refresh, install the @vitejs/plugin-react-refresh package.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners