Jonathan Kelley d84fc05386 feat: plug in bubbling 3 gadi atpakaļ
..
src d84fc05386 feat: plug in bubbling 3 gadi atpakaļ
CHANGELOG.md 2b928372fb Release dioxus-core v0.1.3, dioxus-core-macro v0.1.2, dioxus-html v0.1.0, dioxus-desktop v0.0.0, dioxus-hooks v0.1.3, dioxus-liveview v0.1.0, dioxus-mobile v0.0.0, dioxus-router v0.1.0, dioxus-ssr v0.1.0, dioxus-web v0.0.0, dioxus v0.1.1 3 gadi atpakaļ
Cargo.toml 868f6739d2 fix: keyword length 3 gadi atpakaļ
README.md 14961023f9 wip: polish some more things 3 gadi atpakaļ

README.md

Common hooks for Dioxus

This crate includes some basic useful hooks for dioxus:

  • use_state
  • use_ref
  • use_future
  • use_coroutine

use_state

The primary mechanism of stored state.

You can always use it "normally" with the split method:

// Rusty-smart-pointer usage:
let value = use_state(&cx, || 10);

// "Classic" usage:
let (value, set_value) = use_state(&cx, || 0).split();