More technically and for robust implementation the concept is called Access Control List (ACL). This (levelup.gitconnected.com/access-control-in-a-reac…) article will give you more insights into the concept.
Router with ACL github.com/AlanWei/react-acl-router
Also, googling 'Access control list react' will bring up many relevant articles and npm packages that might be useful for your requirement.