I wrote my project in react and now I want to add it to Laravel using inertia.js but I can't access context since I'm using dynamic-import for code splitting. I'm wondering if there is a way to access context in this situation. This is my app.js code:
import React from 'react'
import { render } from 'react-dom'
import { createInertiaApp } from '@inertiajs/inertia-react'
createInertiaApp({
resolve: name => require(./src/screens/${name}),
setup({ el, App, props }) {
render(<App {...props} />, el)
},
})