nodezoo / nodezoo-web

nodezoo.com front end
MIT License
12 stars 61 forks source link

module info.js is seemingly rerendering entire result list on state change #32

Closed Georgette closed 8 years ago

Georgette commented 8 years ago

When navigating to route /info/seneca (for example), and when the results load/change, the page seems to be rerendering the entire result list instead of what really has changed. Something seems to be causing a React reconciliation failure.

mcdonnelldean commented 8 years ago

I think it has something to do with the inline way this is done, https://github.com/nodezoo/nodezoo-web/blob/master/client/containers/info.js#L44-L76

Also the timer doesn't help matters, it should really be a socketed action, we have an example of a socket reducer in vidi-dashboard using nes.

Georgette commented 8 years ago

I honestly don't see anything wrong on the react side of things (offhand). It is my suspicion that the data is changing causing those if conditions to change. I'll do some logging and see.

Georgette commented 8 years ago

So this is because the data pulses are returning a null value. I placed a bandaid on it by telling react not to update when the result is false/undefined/null. We might want some additional result checking/ flow control later on when true sockets are in place.