t2-stat-parser/app/webapp/resources/js/app.js

19 lines
409 B
JavaScript
Raw Normal View History

2020-03-29 15:31:16 +00:00
import { InertiaApp } from '@inertiajs/inertia-react'
import React from 'react'
import { render } from 'react-dom'
const app = document.getElementById('app')
render(
<InertiaApp
initialPage={JSON.parse(app.dataset.page)}
resolveComponent={name => import(`@/Pages/${name}`).then(module => module.default)}
/>,
app
)
// This is required to enable HMR
if (module.hot) {
module.hot.accept();
}