I am trying to integrate React with Adonis Js to create a SPA. Adonis handles routing to SPA on
Route.any('*', function * (request, response) { yield response.sendView('home') })
I did just that in app> Http> routes.js
Then I created home.njk in Resources> Views to act as the landing page for my application. Now I have a reaction file where I created a footer. I want to handle all the links in the footer using React-router. React router processes URLs to go to the page. However, the above code (in Adonis) says that any url (*) is going to display "home". This is exactly what is happening.
How to get around this? Thanks!
source share