This is my app.jsx and i want to access isAdmin
state of Login Component
into app.js...isAdmin
identifies whether user is admin or not and based upon the value..i want to manipulate the routes....How i can achieve this ??
Please help i am new to react...
import Login from './components/Forum/login';
console.log("login",Login.this.state.isAdmin);
ReactDOM.render(
<Router history={browserHistory}>
<Route path="/" component={Base}>
<IndexRoute component={isAdmin == true ? DashboardV1 : ChartFlot } />
<Route path="dashboard" component={DashboardV1}/>
<Route path="dashboardv2" component={DashboardV2}/>
<Route path="dashboardv3" component={DashboardV3}/>
<Route path="form-cropper" component={FormCropper}/>
</Router>,
document.getElementById('app')
);