Updating component state from store
Why isn't my components EditMode updating with this layout and how to properly implement this?
render() {
return (
<View>
<SortableSudokuGrid
ref={component => (this._sortableSudokuGrid = component)}
containerStyle={{ backgroundColor: "#fff" }}
columnCount={this.state.columnCount}
dataSource={this.props.data}
renderCell={this._renderGridCell}
sortable={this.state.sortable}
/>
<Text>{this.props.EditMode.isEditing}</Text>
</View>
);
}
This works:
render() {
return (
<Text>{this.props.EditMode.isEditing}</Text>
);
}
Please try to create a minimal test case.
On Fri, Jun 30, 2017 at 1:16 PM, jwhscholten [email protected] wrote:
Why isn't my components EditMode updating with this layout and how to properly implement this?
render() { return (
<SortableSudokuGrid ref={component => (this._sortableSudokuGrid = component)} containerStyle={{ backgroundColor: "#fff" }} columnCount={this.state.columnCount} dataSource={this.props.data} renderCell={this._renderGridCell} sortable={this.state.sortable} /> ); }{this.props.EditMode.isEditing} This works:
render() { return (
{this.props.EditMode.isEditing} ); }— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mobxjs/mobx-react/issues/289, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIrco2yINeeos74D0YmAzdTLVYyUT77ks5sJTuZgaJpZM4OK5ij .
-- -Matt Ruby- [email protected]
Sorry, please ignore this (non) issue.