How to setup react-bootstrap-table-next with mobx store?
My problem that bootstrap table doesn't render "store" changes. Is there any specific method/property that will trigger data refresh? The same code sample works with local state:
Full mobx example: https://codesandbox.io/s/react-bootstrap-table-next-with-mox-store-basic-example-not-rendering-changes-o5v6g
Local state example: https://codesandbox.io/s/react-bootstrap-table-next-with-local-state-basic-example-rendering-changes-1o9b9
// store
class Store {
@observable data = [];
@action setData(list) {
this.data.push(...list);
}
...
}
// component
@observer
class ProductList extends React.Component {
render() {
return
<BootstrapTable
keyField="id"
data={this.props.store.data}
...
/>
}
}
// App.js
ReactDOM.render(<ProductList store={store} />, rootElement);