I\'m using react-router and I want to render a menu component when the user is not in the root and not in the /login path. This is what I have so far
Taken Regex from Arman's answer.
const notInLogin = /^(?!.*(\/login)).*$/ export default () => ( <> > )
If you get PropsType error: https://stackoverflow.com/a/50439120/1099314