X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fapp.js;h=f5614c4efcee05e861da3ae9ec17b446b275035f;hb=e086f5821a02d7f577baf4edbcdb14c509732f4c;hp=40c55f65c25644d4f09d3c734b219a2aa736b134;hpb=4bf2dd1dd1f6d31b2ebe299b7495a8b0e259ec77;p=alttp.git diff --git a/resources/js/app.js b/resources/js/app.js index 40c55f6..f5614c4 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -1 +1,25 @@ -require('./bootstrap'); +/** + * 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. + */ + +import './bootstrap'; + +import React from 'react'; +import ReactDOM from 'react-dom'; + +import toastr from 'toastr'; +toastr.options.positionClass = 'toast-bottom-right'; + +/** + * 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. + */ + +import App from './components/app'; + +if (document.getElementById('react-root')) { + ReactDOM.render(, document.getElementById('react-root')); +}