Im using a shared global state as the following:
interface DashboardProps extends React.Props<Dashboard> {
globalState? : GlobalState
}
export class Dashboard extends React.Component<DashboardProps, any>{
}
In AppLayout
i call it:
<Route path='/dashboard'>
<Dashboard globalState={this.state} />
</Route>
let say that inside Dashboard
class I need to change the globalState
, whats the best way to do so?
Thanks