Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lukehutch committed Jul 21, 2023
1 parent 73c3ad5 commit a7afb77
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ Now whenever `counter.value` changes (here using `counter.value++` in the `onPre

(The only place you're not allowed to update `counter.value` is the `build` method of a widget, since state changes are disallowed in `build` methods.)

There is no need to dispose the `ValueNotifier` listener -- it is automatically removed whenever the value changes (and it is added back whenever the `build` method is called, during a rebuild).

That's all there is to it, at least for simple usage!

## Optimizing UI updates
Expand Down

0 comments on commit a7afb77

Please sign in to comment.