laravel and react
18 July 2017Some notes on setting up Laravel with React.
-
Remove the reference to Vue from
devDependencies. -
npm install. -
npm install --save react react-dom. -
Replace the code in
resources/assets/js/app.jswith the root React boilerplate (importing the rootApp.jscomponent and rendering it to the DOM). -
Replace
components/Example.vuewithApp.js. -
Set up the root div in the home view and route to it if necessary.
-
In
webpack.mix.js, replacemix.jswithmix.react. -
npm run watch.