diff --git a/src/components/Body.js b/src/components/Body.js index f9a8923..e121844 100644 --- a/src/components/Body.js +++ b/src/components/Body.js @@ -16,18 +16,23 @@ export default class Body extends React.Component { /** @listens Table#newTable loads new Table*/ handleEvents() { + const self = this; Emitter.on("newTable", (obj, err) => { if (err) throw err; - this.setState({ table: obj }); + + console.log("newTable", obj); + debugger; + self.setState({ table: obj }); }); } componentWillMount() { this.initialize(); } - shouldComponentUpdate(nextProps, nextState) { - return this.state.table !== nextState.table; + shouldComponentUpdate(nextProps, state) { + return this.state.table.id !== state.table.id; } render() { + console.warn("Render:", this.state.table); return (