Just use it like you'd use any other JS framework: swap out the default Vue setup for React, it's supported by Mix: https://laravel.com/docs/5.4/mix#react
Mar 28, 2018
2
Level 3
React.js with php?
I was wondering if any1 has any good sources of how to use php and react together? or any tutorials on how the file structure works together with front end and backend.
Level 53
Just run php artisan preset react on a new project and you are ready to go. Basically, use the resources directory to construct you React components, etc. If you want to separate the front and backend, then develop the Laravel side as an api and use react with react-router-dom and the new context api for the frontend.
Please or to participate in this conversation.