ReducerHook
The return value of useReducer.
The current state is available via state and action dispatcher is available via dispatch.
Note: there are two rules for using Hooks:
-
Only call Hooks at the top level.
-
Only call Hooks from inside a function component.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → TState
-
The current state of the component.
no setter
Methods
-
dispatch(
TAction action) → void -
Dispatches
actionand triggers state changes. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited