13 ms·
> Few.swift lets us express UIs as stateless, composable, immutable-ish values of their state. When their state changes, Few.swift calls a function to render th
by 21echoes 11y ago
> Few.swift lets us express UIs as stateless, composable, immutable-ish values of their state. When their state changes, Few.swift calls a function to render the UI for that state, and then intelligently applies any changes.
arent most Objective-C and Swift views written like this already?
in the .h:
@property Klass *model;
in the .m:
- (void)setModel:(Klass *)model {
if (![model isEqual:_model) {
_model = model;
// ... stuff like self.text = model.value ...;
[self setNeedsLayout];
}
}