reka.js
reka.js copied to clipboard
Cache props evaluation
The evaluator has caching points to prevent unnecessary re-evaluation.
However, when any descendant of a TagTemplate gets re-evaluated; it will cause all of its ancestor TagTemplate to re-evaluate its props unnecessarily.
val global = 0;
component App() => (
<div color={global + 1}> // props of the parent gets re-evaluated if there's any change to any of it's descendant
<div>
<text value={"Hello"} /> // if this tag changes, all of its parent's props will be re-evaluated
</div>
</div>
)