Jul 27, 2018
0
Level 102
React BrowserRouter refreshes page when using Link
I am trying to get Laravel to work properly with react router. Sadly when using BrowserRouter and Link, the page makes a full refresh (instead of using browser history). If I switch to using HashRouter, it works as expected, but I really wan't to use the BrowserRouter.
Any hints as to how I should get it working properly?
My web route
Route::view('/{path?}', 'index')
->where('path', '.*')
->name('react');
I am using docker with nginx for webserver
Please or to participate in this conversation.