|
|
|
|
|
by syntern
4352 days ago
|
|
On the DOM reuse: could you help me out? I'm sure if I watch all the videos I may be able to figure it out, but I'd be interested in a trivial example. Let's assume I have the following structure (additional cells and rows are omitted for cleaner display, please assume we have 1000 rows and 20 cols): <div class="row">
<div class="cell">
<div class="align-left">
Value.
</div>
</div>
</div>
I want to reach the following: <div class="row">
<div class="cell">
<div class="align-center">
Value B.
</div>
</div>
</div>
What do I need to do in React that on updating the underlying data, only the innermost Element's class attribute and innerText would change, and the rest of the DOM will be kept intact? |
|