Q:

are global variables available anywhere in a React app? 

res.locals.user
Would I have access to "user" inside any component to toggle visibility of other components.   Such as: if user exists, render LogOut button component.  

A:

Usually it's not a good practice to use global variables.  If u want to use the variable in your component or its child tree, pass that as a prop to the component.  More details about your component to give a precise answer.