Live data from Hacker News

Show HN: React-data sheet, Excel-like spreadsheet component

nadbm.github.io

1–10 of 93 posts

Re: Show HN: React-data sheet, Excel-like spreadsheet component

#4
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!

Re: Show HN: React-data sheet, Excel-like spreadsheet component

#5

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 ma…

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

Re: Show HN: React-data sheet, Excel-like spreadsheet component

#6

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 ma…

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

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

Re: Show HN: React-data sheet, Excel-like spreadsheet component

#7

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 ma…

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

Re: Show HN: React-data sheet, Excel-like spreadsheet component

#8

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 ma…

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.
Post reply on HN