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

Hot reloading thoughts #11

Open
UkoeHB opened this issue Nov 6, 2023 · 0 comments
Open

Hot reloading thoughts #11

UkoeHB opened this issue Nov 6, 2023 · 0 comments

Comments

@UkoeHB
Copy link
Contributor

UkoeHB commented Nov 6, 2023

Here are some preliminary thoughts about how to implement hot-reloading.

  1. Add extra inner id to widgets.
  • Widget paths point to widgets with the highest current inner ids (among widgets with the same name).
  • Widgets that don't have the highest current inner id are garbage collected.
    • When rebuilding a UI branch, increment the inner id of the branch root widget and all its descendents.
  1. Track which UI branches use specific styles.
  • If a style changes in-file, rebuild the UI branches that use that style.
  1. Track which function calls generate which UI branches.
  • When the file-tracker identifies that a hot-reload-marked function has changed, rebuild the UI branches that were generated by that function (i.e. call that function again).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant