Hide some React component children depending on user role
问题 I am writing a single page application in React and Redux (with a Node.js backend). I want to implement role-based access control and want to control the display of certain parts (or sub parts) of the app. I'm going to get permissions list from Node.js, which is just an object with such structure: { users: 'read', models: 'write', ... dictionaries: 'none', } key is protected resource, value is user permission for this resource (one of: none , read , write ). I'm storing it into redux state.