How can I call in a React component the JavaScript route function generated by the Ziggy's @route directive ?
The route function is generated at runtime so it's impossible to import it beforehand in the react component and therefore, Laravel Mix throws an error and can't compile the project. To be clearer, since i'm using Typescript, I can't compile my component without importing the route function somehow.
My stack is Laravel 8, Inertia, React.