I am working on a React app which has some nested react router switches and non trivial logic involving changing header content based on the currently displayed page.