Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache props evaluation #133

Open
prevwong opened this issue Dec 25, 2023 · 0 comments
Open

Cache props evaluation #133

prevwong opened this issue Dec 25, 2023 · 0 comments

Comments

@prevwong
Copy link
Owner

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>
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant