I get the UserName
and other information about the user from the server by Axios after a successful login and I want to pass this information to my Header
component to show it on all pages.
I can send properties by <Header userName={this.state.UserName}
to the Header
component and it is okay, but when I go to another component from header I lose it and must set state for save username.
Is there any solution to have some property in all Components like Session in Java?