Re:UIs are not pure functions of the model (2018)
by danielvaughn on Tuesday July 05, 2022 @10:49AM
(#31988859)
Wow, I've been trying to come up with a way to do this on the web for a while now, but haven't cracked it yet. Had no idea it was a common thing in other UI technologies.
Re:UIs are not pure functions of the model (2018)
by wruza on Tuesday July 05, 2022 @12:57PM
(#31990721)
Here is the react docs part: https://reactjs.org/docs/optimizing-performance.html#virtual...
Click on the links, there are live examples.
Of course if a table (any collection really) contains differently looking items, it may have more than 10 cells, and rendering controller may choose between them based on which row/column is rendered.
React mentions in their docs a plugin which simulates exactly that (forgot the name, something like react-dynamic-scroll).
Also, some frameworks use cells to render active elements basics, e.g. an input without a frame, or a check mark cell without a background. This helps to make controls editable without instatiating a real input/check/button element at the coordinates of a cell. This makes every button in a container a single button which signals clicks to its container, which based on x,y knows which item that is and signals rendering controller that item X was “clicked on the button B”.