unable define role in reactJs single page application
问题 I'm trying to pass the role to user so that It can check if LoggedIn user is "Admin' or "mod" or only user. how can I pass role to user so that I can check user role after loggedIn? I'm using jwt token from backend for get/post. here is my code class App extends Component { constructor(props) { super(props); this.logOut = this.logOut.bind(this); this.state = { showModeratorBoard: false, showAdminBoard: false, currentUser: undefined }; } componentDidMount() { const user = AuthService