I am studying Typescript
with React
and MobX
.
My MobX
Store likes blew.
store: {
child: {
selected: true,
value: 123
}
}
My Component is
@inject('store')
@observer
class Display extends React.Component<{store: Object}, {}> {
...
render(){
console.log(this.props.store.child.selected); // true
}
}
and I can see this alert.
[ts] Property 'child' does not exist on type 'Object'. [2339]