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

introduce dynamic signals #23

Open
JoshSweaterGuy opened this issue Jul 15, 2024 · 0 comments
Open

introduce dynamic signals #23

JoshSweaterGuy opened this issue Jul 15, 2024 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@JoshSweaterGuy
Copy link
Member

currently when a signal changes it notifies all elements that rely on it to change.
if when this signal changes new signals are added to the dependency list it appends them too.

example:

// in this example name is not a dependency of this custom page-body unless toggle is true.
// if name changes but toggle is true there is no need to rerender the screen
// however if toggle is true then it must rerender whenener name changes
var body: some Page {
  H1(toggle ? "hello": "hello \(name)")
}

Problem

currently once a dependency is added as a signal of a element it never gets removed and therefore will lead to unnecessary re-renders.

@JoshSweaterGuy JoshSweaterGuy added bug Something isn't working enhancement New feature or request labels Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant