Bonus: React State Anti‑Patterns (SPFx)
Spot and fix common state anti‑patterns in SPFx React apps.
21 posts
Spot and fix common state anti‑patterns in SPFx React apps.
Manage multi-step and complex forms in SPFx with clean state patterns.
Step-by-step migration from legacy class components to modern function components (using hooks).
Memoization, useCallback, avoiding re-renders, and debugging SPFx with DevTools.
Prefer composition over inheritance: children props, slots, and HOCs in SPFx.
Separate data-fetching from rendering with the container/presentational pattern.
Type-safe, reusable functional components for SPFx with clean props design.
When to use class components vs function components with hooks in SPFx.
A reusable abortable fetch hook for SPFx to prevent setState after unmount.
Debounce SPFx input handling with a simple, reusable hook.
Manage form state and validation in SPFx with a reusable hook.
A reusable hook to query SharePoint list items in SPFx.
Patterns for fetching and managing external data in SPFx with hooks.
Choosing and implementing global state for SPFx: Context, Redux, or Zustand.
When and how to use local state in SPFx components.
Model complex state transitions in SPFx with useReducer.
Share data across SPFx components with the Context API and useContext.
Access DOM and persist values without re-renders in SPFx using useRef.
Handle side-effects and subscriptions in SPFx with useEffect.
Managing local component state in SPFx web parts with useState.
Central hub for React in SPFx: hooks, state, components, and patterns.