How to hide login and register from navbar after login in react Js?

I have the navbar shown below. So I need to hide login and register from the navbar after login. This navbar is in my Homepage.
Can anyone suggest or help me?
Thanks

It would be nice to see some code and hear what you have tried so far.

You can do a conditional render of the login button/link based on the state and if the user is logged in or not.

@lasjorg
Can you give me an example?

The link I gave you has a bunch of examples.

We need to see some code to know what you are working with. Post a Github link or a live example.

Try this maybe:

https://codepen.io/gaearon/pen/ZpVxNq?editors=0011