oboe 0.1.0 oboe: ^0.1.0 copied to clipboard
Oboe is elegant from the name to the way it is used. Its description only needs two screenshots, Oboe not need Provider at root Widget, Oboe is tiny and ease use, only 2 API.
Oboe - Elegant state management library #
Oboe is elegant from the name to the way it is used. Its description only needs two screenshots
Feture #
- Oboe not need Provider at root Widget.
- Oboe use
memo
to intercept update, like react.Hooks. - Oboe is tiny and ease use, only 2 API:
ob
,next
Install Oboe #
Change pubspec.yaml
:
dependencies:
oboe:
Overall interpretation #
Instance a user
,extends Oboe
:
// Definition Oboe
class User extends Oboe {
String name = "dog";
}
// Instance, use some widgets
var user = User();
Subscribe and return a weight:
user.ob(()=>Text(user.name))
Submit and update user.ob's subscribe:
user.next()
Better performance #
Use memo
options params, like React.useMemo
, only rerender data in memo array.
Example only rerender when user.name change:
user.ob(
() => Text(user.name),
memo: ()=>[user.name],
);
Thanks #
That all, keep sample :)