Research how to support dynamism in view structure (conditionals, repetition)
- Dominant language
- Rust
- Stars
- 80
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
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:
- [x] 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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.