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

UI state update and persistence #16

Open
lukesutton opened this issue May 26, 2021 · 0 comments
Open

UI state update and persistence #16

lukesutton opened this issue May 26, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@lukesutton
Copy link
Owner

This shouldn't be built into every view, but if we want to allow widgets to be built on top of Buckle, we need to investigate how state can be stored and persisted for a view. Many widgets would have ephemeral state, which nonetheless needs to persist between re-renders.

SwiftUI does this using property wrappers, where the runtime inspects views for @State properties and automatically persists them.

React handles it by having a more complicated life-cycle, where views are managed by stateful components.

Ideally, we want something that is transparent to users if they don't care about it, but can be used if they wish to make their own stateful widgets on top of Buckle primitives.

@lukesutton lukesutton added the enhancement New feature or request label May 26, 2021
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