state
↔ persistent Snapshot of infothat App can access at given point in time
piece of memory stored insider a Fiber
Component State
mechanism for storing values inside Component over time
Backing Instance
Object (created in memory) to store & access data
includes referenceable values that do not require further calculations or assignment
Controlled Component
Component with state manage by ReactDOM
Uncontrolled Component
Component with state manage by DOM API NOT ReactDOM
state can be temporary or persistent
stateless
state essential for any interactive App
References
CC
↔ Reactclass
Instanceextends
React.Component
, provides render() Method to return UI, manage state & perform side effects on Lifecycle Methodsthis.state
↔ to initialize state in CCReact.Component
↔ base Abstract Class that provides render() method to return React Element(s), state & Lifecycle MethodsReduce
↔ (process) to generate new state based on current state & some Action payloadPassive State
↔ persistant state NOT trigger re-render on updateHook
↔ Specialized Function Functionally extends FC with Lifecycle Method & persistent stateReact DevTools
↔ Browser Extension to inspect React App (dev build only!) to view Component Hierarchy,props
& stateDiffing
↔ React HeuristicAlgorithm to reconcile change in state vs view & handle update to DOMref
↔ Object return byuseRef()
to store state value, with mutable.current
Stable Variable won't trigger re-renderuseState()
↔ Stateful Hook to persist single state value in FCAction
↔ object withtype
&payload
info to pass Reducer to update stateControlled Component
↔ Component with state manage byReactDOM
Updater Function
↔ function call by Component to update state valueStateful Hook
↔ (typeof) Hook to add state to FCFC
↔ function to return UI via JSX. Passprops
for dynamic input. add state via HookShared Layout
↔ UI to share mutliple Pages viachildren
, to preserve state & not trigger re-renderClient State
↔ state store by Client (Browser), TSCServer State
↔ state store on Backend RASP (Remote Async Shared Persistent)Remote
↔ of Server State to store on remote Backend, w/o Client direct access/control over stateredux
↔ (Design Pattern) to colocate state in global external central store, to control data flow with predictable scalable pattern of Dispatch > Reducer > StoreusePrevious()
↔ Custom Hook to get previous value ofprops
or stateRedux Store
↔ central global container to manage App state forredux
Root Reducer
↔redux
fn to compute new state from old state & Action data@apollo/client
↔ JS state management lib to manage local/remote data via Declarative GraphQL Data FetchuseReducer()
↔ Stateful Hook with logic to update new state from current state & payload via Redux PatternuseSelector()
↔ OLD Redux API Library Hook to select piece of state from Redux Store. rep byuseAppSelector()
storybook
↔ popular Frontend Dev tool to isolate UI to doc/showcase/test, detangle Business Logic/state/Context
Story
↔export default
Object to Declaratively render FC snapshot with specific key state to dev/test/doc
<code>export</code> default {
title "Button",
component: Button
}
<code>export</code> const ButtonRed = () => <Button label="Press me" backgroundColor="red" /\>
useAuth()
↔async
Custom Hook to get Auth state from Backend/Online APITime-Travel
↔ (feat) to revisitredux
state historyProtected Route
↔ Route with access restrict to Auth stateCentralized
↔redux
manages App state from single global locationUncontrolled Component
↔ Component with state manage by DOM API NOTReactDOM