Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nice! Looks really polished!

One thing I'm wondering about... if this is React based, do you reassign and recalculate the whole grid upon every change? Because the grid is probably a component, and has the table as props. I could imagine that is inefficient... Not to even speak of then rendering the whole component and sending it through DOM reconciliation every time a key is pressed.

Well, OTOH I guess it doesn't matter for small tables. The demo feels really snappy!



I've built something similar (and performant) utilizing react-virtualized, Immutable.js, and the star: shouldComponentUpdate

https://bvaughn.github.io/react-virtualized/#/components/Gri...


Wouldn't it just re-render the cells that changed?


Yup, checking the source there's a cell component in addition to the sheet component, so it would just rerender that cell.


Back in the day I did a perl spread sheet. I was only updating the cells that were displayed at the moment. There were also transitive recalcs too if a displayed cell depended on other cells.


It calculates the top level grid component but does not render the cell if it's the same cell object :).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: