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

Add set_if_neq for UseStateHandle #2109

Merged
merged 3 commits into from
Oct 15, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add docs
  • Loading branch information
voidpumpkin committed Oct 11, 2021
commit 337a018db611c2a8da3a289f59c39cee984a15bf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: "The pre-defined Hooks that Yew comes with "

`use_state` is used to manage state in a function component.
It returns a `UseState` object which `Deref`s to the current value
and provides a `set` method to update the value.
and provides `set` and `set_neq` methods to update the value.

The hook takes a function as input which determines the initial state.
This value remains up-to-date on subsequent renders.
Expand Down