I have the following React based component which has a dictionary object (foo) that contains another dictionary (bar) for it's state.
I want to set the value of the inner dictionary but can't figure out how to do it:
class App extends Component {
state = {
foo: {
title: "My title",
bar: {}
}
}
componentDidMount() {
this.state.foo.bar = { "test": "123" };
}
}