Here I am returning the current react dom stuff:
return (
<React.Fragment>
{inProduction ? null : <CP.Dev/>}
<CP.Snackbar
{...p as any}
/>
<Router history={browserHistory}>
<Switch>
<Route path="/login" component={Login} />
<Route path="/signup" component={Signup} />
{authRoutes}
</Switch>
</Router>
</React.Fragment>
);
so..the Snackbar component renders for every route - goal: what I want to do is render a different welcome message depending on what the url is - what is the best way to do this? How can I listen for a url change and then render a different message depending on the url?
Alternatively, I could wrap every component with Snackbar and then hardcode a key to a different message, but that seems unnecessary.