8889841cExample.js000066600000001235150513733550006511 0ustar00import React from 'react'; import ReactDOM from 'react-dom'; function Example() { return (
Example Component
I'm an example component!
); } export default Example; if (document.getElementById('example')) { ReactDOM.render(, document.getElementById('example')); } webpack.mix.js000066600000001047150513733550007327 0ustar00const mix = require('laravel-mix'); /* |-------------------------------------------------------------------------- | Mix Asset Management |-------------------------------------------------------------------------- | | Mix provides a clean, fluent API for defining some Webpack build steps | for your Laravel application. By default, we are compiling the Sass | file for the application as well as bundling up all the JS files. | */ mix.js('resources/js/app.js', 'public/js') .react() .sass('resources/sass/app.scss', 'public/css'); app.js000066600000000770150513733550005701 0ustar00/** * First we will load all of this project's JavaScript dependencies which * includes React and other helpers. It's a great starting point while * building robust, powerful web applications using React + Laravel. */ require('./bootstrap'); /** * Next, we will create a fresh React component instance and attach it to * the page. Then, you may begin adding components to this application * or customize the JavaScript scaffolding to fit your unique needs. */ require('./components/Example');