I currently have a Switch/Route system like this:
<Switch>
<Route path="/app" exact>
<AppPage/>
</Route>
</Switch>
I now want an optional query param such that the path would be
/app?code=:code
So /app
or /app?code=:code
should both redirect to <AppPage>
However when I change the code to
<Switch>
<Route path="/app?code=:code" exact>
<AppPage/>
</Route>
</Switch>
going to app
or app?code=123
now redirects to nothing. Am I missing something?