8889841cExample.js 0000666 00000001235 15051324506 0006503 0 ustar 00 import 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.js 0000666 00000001047 15051324506 0007321 0 ustar 00 const 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.js 0000666 00000000770 15051324506 0005673 0 ustar 00 /**
* 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');