Closed pcg92 closed 7 years ago
Im using meteor to display alerts when some vars changes.
trackNewOrders(){ Tracker.autorun( (thisTracker) =>{ var oldest = _.max(this.props.orders,(order) => { return order.clock; }); if(oldest.clock){ if (!_.findWhere(this.state.array, {'_id':oldest._id})) { Alert.success('New order, { position: 'top-right' }); this.state.array.push(oldest); } } }); }
_renderNewRootComponent(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
I dont understand that error
even I'm getting the same error
Im using meteor to display alerts when some vars changes.
_renderNewRootComponent(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
I dont understand that error