I need to change render function and run some sub render function when a specific state given,
For example:
render() { return (
What about switch case instead of if-else
render() { switch (this.state.route) { case 'loginRoute': return ( ); case 'adminRoute': return ( ); default: return <>>; }