Skip to main content

17 docs tagged with "Stateful Hook"

View All Tags

dynamic value for initial useState()

dynamic value for initial useState(). Topics on: props, initializer function. Read more: React, React API, Hooks API, Stateful Hook, Use State, Initial|Dev Wiki

initial

initial is defined as: value used to setup first instance render, ignored on re-render. Topics on: static initial values for useState(), dynamic value for initi

Initialization Argument

Initialization Argument is defined as: Argument pass to Initialization Function. Topics on: . Read more: React, React API, Hooks API, Stateful Hook, Use Reducer

Initialization Function

Initialization Function is defined as: function pass as Initialization Argument to useReducer() to generate Initial State for Reducer. Topics on: . Read more: R

initializer function

initializer function is defined as: set value to result of calculation. Topics on: pass function reference but do not invoke it with (), pass Initializer Functi

Lazy Initial value

Lazy Initial value is defined as: function pass as Parameter into useState(), to assign return value as Initial State value, on first-call only. Topics on: Lazy

Passive State

Passive State is defined as: persistant state NOT trigger re-render on update. Topics on: . Read more: React, React API, Hooks API, Stateful Hook, Use Ref, Pass

setter

setter is defined as: function to set new value; !convention prefix set* to value name. Topics on: !gotcha Referential Equality - do not mutate Array or Object

Stateful Hook

Stateful Hook is defined as: (typeof) Hook to add state to FC. Topics on: useState(), useReducer(), useRef(), useContext(), userDeferredvalue(), useTransition()

static initial values for useState()

static initial values for useState(). Topics on: true/false, empty string '', null. Read more: React, React API, Hooks API, Stateful Hook, Use State, Initial

useContext()

useContext() is defined as: Stateful Hook to subscribe to Context persist state in app-wide store in Parent Component. Topics on: . Read more: React, React API,

useReducer()

useReducer() is defined as: Stateful Hook with logic to update new state from current state & payload via redux. Topics on: useReducer() for updating multiple p

useRef()

useRef() is defined as: Stateful Hook to persist Passive State Variable across renders in FC, as ref handle Escape Hatch to DOM API elements. Topics on: useRe

useState()

useState() is defined as: Stateful Hook to persist single state value in FC. Topics on: const [_value, _setter] = useState(initial), Lazy Initial value, !flow d

useState() vs CC

useState() vs CC. Topics on: CC can only have ONE state of Object type, CC always re-render if updated; even if nothing changed, CC has extends React.PureCompon

value

value is defined as: name for state being tracked. Topics on: when useState called, React checks if value & only re-render if value changes. Read more: React, R