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

Research how to support dynamism in view structure (conditionals, repetition) #2

Open
1 of 2 tasks
fwcd opened this issue Mar 20, 2023 · 0 comments
Open
1 of 2 tasks
Labels
enhancement New feature or request

Comments

@fwcd
Copy link
Owner

fwcd commented Mar 20, 2023

Currently, we only support very static views. Similar to SwiftUI, we'd like to have support for some form of conditionals, repetitions (ForEach) etc. Some problems that come up:

  • Need for explicit view identification (Structural identity is no longer sufficient, SwiftUI solves this by requiring the data model underlying ForEach to be Identifiable or explicit id paths)
  • Need for rebinding the state (while this should mostly already be handled by the default View::render implementation which calls to the (usually derived) View::bind implementation, we should make sure to not accidentally leak state via the storage or similar)
    • We might also want to investigate how view lifecycle should work here e.g. if an If view switches back and forth between the branches, should we maintain the state within those views? Might be worth researching what SwiftUI does here.
@fwcd fwcd added the enhancement New feature or request label Mar 20, 2023
@fwcd fwcd pinned this issue Mar 27, 2023
@fwcd fwcd unpinned this issue Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant