react

React library for building user interfaces. Use when building web applications, creating components, managing state, handling side effects, or optimizing performance.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "react" with this command: npx skills add hairyf/skills/hairyf-skills-react

React

The skill is based on React, generated at 2026-01-31.

React is a JavaScript library for building user interfaces. It lets you compose complex UIs from small and isolated pieces of code called "components". React uses a declarative paradigm that makes it easier to reason about your application and aims to be both efficient and flexible.

Core References

TopicDescriptionReference
useStateHook for managing component state with direct updatescore-usestate
useEffectHook for synchronizing components with external systemscore-useeffect
useContextHook for reading and subscribing to contextcore-usecontext
useRefHook for referencing values that don't trigger re-renderscore-useref
useReducerHook for managing complex state with a reducer functioncore-usereducer
SuspenseComponent for displaying fallback UI while content is loadingcore-suspense
memoHigher-order component for memoizing component renderscore-memo
createContextAPI for creating context objectscore-createcontext
FragmentComponent for grouping elements without wrapper nodescore-fragment
StrictModeComponent for enabling additional development checkscore-strictmode

Features

Performance Optimization

TopicDescriptionReference
useMemoHook for caching expensive calculationsfeatures-usememo
useCallbackHook for caching function definitionsfeatures-usecallback
lazyAPI for code splitting and lazy loading componentsfeatures-lazy
useTransitionHook for non-blocking state updatesfeatures-usetransition
useDeferredValueHook for deferring non-critical UI updatesfeatures-usedeferredvalue
useLayoutEffectHook that fires synchronously before browser repaintfeatures-uselayouteffect
startTransitionAPI for marking non-blocking state updatesfeatures-starttransition

Advanced Hooks

TopicDescriptionReference
useIdHook for generating unique IDs for accessibilityfeatures-useid
useAPI for reading Promise and Context valuesfeatures-use
useActionStateHook for managing form action statefeatures-useactionstate
useOptimisticHook for optimistic UI updatesfeatures-useoptimistic
useInsertionEffectHook for CSS-in-JS libraries to inject stylesadvanced-useinsertioneffect
useSyncExternalStoreHook for subscribing to external storesadvanced-usesyncexternalstore
useImperativeHandleHook for customizing ref handlesadvanced-useimperativehandle
useEffectEventHook for extracting non-reactive logic from Effectsadvanced-useeffectevent
useDebugValueHook for adding labels to custom hooks in DevToolsadvanced-usedebugvalue

React DOM APIs

TopicDescriptionReference
createRootAPI for creating a root to render React componentsreact-dom-createroot
hydrateRootAPI for hydrating server-rendered HTMLreact-dom-hydrateroot
createPortalAPI for rendering children into different DOM nodesreact-dom-createportal
flushSyncAPI for forcing synchronous updatesreact-dom-flushsync

React Server Components

TopicDescriptionReference
cacheAPI for caching function results in Server Componentsrsc-cache

Advanced Components

TopicDescriptionReference
ProfilerComponent for measuring rendering performanceadvanced-profiler
ActivityComponent for hiding and restoring UI statefeatures-activity

Testing

TopicDescriptionReference
actTest helper for applying pending updates before assertionstesting-act

Best Practices

TopicDescriptionReference
Rules of HooksFundamental rules for using React Hooks correctlybest-practices-rules-of-hooks
Component PurityRules for keeping React components and hooks purebest-practices-purity

Key Recommendations

  • Use hooks at the top level - Never call hooks conditionally or in loops
  • Keep components pure - Components should be idempotent and have no side effects during render
  • Use useEffect for side effects - Synchronize with external systems using Effects
  • Memoize expensive calculations - Use useMemo for costly computations, useCallback for functions passed to memoized components
  • Code split with lazy - Use lazy and Suspense for route-based code splitting
  • Avoid premature optimization - Profile first, optimize only when needed
  • Use React Compiler - Consider using React Compiler for automatic memoization
  • Handle dependencies correctly - Always include all reactive values in Effect and memoization dependencies

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

tailwindcss

No summary provided by upstream source.

Repository SourceNeeds Review
753-hairyf
General

hairy-utils

No summary provided by upstream source.

Repository SourceNeeds Review
689-hairyf
General

react-use

No summary provided by upstream source.

Repository SourceNeeds Review
503-hairyf
General

motion

No summary provided by upstream source.

Repository SourceNeeds Review
487-hairyf