Browser page refreshes break my application.
I'm using react navigation in an expo universal application. When a user refreshed the browser on route "/", everything works as intended. When a user refreshed on any other route, e.g. "/search" I see this served:
Cannot GET /search
I have looked at deep linking
import * as Linking from 'expo-linking'
...
const prefix = Linking.createURL('/')
const linking={
prefixes: [prefix],
config: {
screens: PathsByName,
},
}
<NavigationContainer linking={linking}>
...
</NavigationContainer>
as well as a custom webpack
config.devServer.historyApiFallback = {
index: 'index.html'
}
but I still cant get simple page refreshes to load properly.