You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've found that there are some cases where I want to render something on every page but one, or two. For example, something like a navigation header, or a site footer. You may want to remove those things in, for example, a checkout flow to remove distractions from the user. On the other hand, I definitely don't want to repeatedly add <NavHeader /> and <Footer /> everywhere. It would be nice if I could do something like this:
constFooter=()=><Routepath="/checkout"invert={true}render={()=><div>
Some cool footer links here.
</div>}/>;
#5866 is tracking work on allowing path to accept an array, which would fulfill my use cases exactly. Right now I'm working around this with a component wrapping a Route that always renders and doing some checking on the location using matchPath before rendering. E.g.
I've found that there are some cases where I want to render something on every page but one, or two. For example, something like a navigation header, or a site footer. You may want to remove those things in, for example, a checkout flow to remove distractions from the user. On the other hand, I definitely don't want to repeatedly add
<NavHeader />
and<Footer />
everywhere. It would be nice if I could do something like this:#5866 is tracking work on allowing path to accept an array, which would fulfill my use cases exactly. Right now I'm working around this with a component wrapping a
Route
that always renders and doing some checking on the location usingmatchPath
before rendering. E.g.The text was updated successfully, but these errors were encountered: