I'm trying to set a route based on a BASE_URL
(URL of live web app) and also takes an :id
parameter of some kind but I'm seeing an error of No routes matched location "/"
. I'm working with React Native and react-router-native v6.
Here is a code snippet:
return (
<NativeRouter>
<SafeAreaView edges={['right', 'top', 'left']} style={{ flex: 1 }}>
<Webview url={`${BASE_URL}/about`} />
<Routes>
<Route path={`${BASE_URL}/:id`} element={SomeWebview} />
</Routes>
</SafeAreaView>
</NativeRouter>
)
}
When a link from this current page/component with some unique ID is clicked, I want the component SomeWebview
to be rendered, which it isn't right now. I'd be happy to provide more details as necessary. Thank you.