3 ms·
I'm the author of rui, in case anyone has questions :)
by tayistay 4y ago
I'm the author of rui, in case anyone has questions :)
- sawaali 4y agoHow different is the state managementin SwiftUI compared to the state in rui?
- tayistay 4y agoI've built some of the same sort of primitives, albeit with different syntax. Rui's `state` function will give you a state handle allowing you to mutate state similarly to how @State works in SwiftUI. rui also has a notion of bindings, just like SwiftUI, and even environment. This is all great for defining state that's local to a widget, which I've seen some other reactive/declarative libraries struggle with actually. Rui doesn't have an equivalent of @ObservedObject, and it's not clear to me that it needs one because state values can be accessed by reference.