React
39 rules in fabricahq/public-library
Accept ref as a prop in React 19
LOWfabricahq/public-libraryAuthenticate and authorize inside every Server Action
CRITICALfabricahq/public-libraryAvoid copying props to state
HIGHfabricahq/public-libraryAvoid loading large barrel files
MEDIUMfabricahq/public-libraryAvoid unnecessary Effects
HIGHfabricahq/public-libraryBuild complex components from composable parts
MEDIUMfabricahq/public-libraryCompose independent server data fetches as siblings
HIGHfabricahq/public-libraryCreate explicit component variants instead of boolean mode props
MEDIUMfabricahq/public-libraryDeduplicate per-request server work with cache
MEDIUMfabricahq/public-libraryDo not define components inside components
HIGHfabricahq/public-libraryFollow the Rules of Hooks
HIGHfabricahq/public-libraryGive every interactive element a role and an accessible name
HIGHfabricahq/public-libraryGive repeated and persistent surfaces stable test ids
MEDIUMfabricahq/public-libraryHint critical resources with React DOM resource APIs
MEDIUMfabricahq/public-libraryInitialize expensive state lazily
LOW-MEDIUMfabricahq/public-libraryKeep components and Hooks pure
HIGHfabricahq/public-libraryKeep input responsive by marking non-urgent updates
MEDIUMfabricahq/public-libraryKeep non-critical scripts off the critical path
MEDIUM-HIGHfabricahq/public-libraryKeep request data out of shared module state
HIGHfabricahq/public-libraryKeep values that do not affect rendering in refs
MEDIUMfabricahq/public-libraryLift shared component state into a provider behind an interface
MEDIUMfabricahq/public-libraryLoad heavy optional code on demand
HIGHfabricahq/public-libraryMemoize deliberately
MEDIUMfabricahq/public-libraryName Effect and non-trivial Hook callbacks
LOWfabricahq/public-libraryName generic components by capability, not by first caller
MEDIUMfabricahq/public-libraryPass only the data Client Components use
MEDIUMfabricahq/public-libraryRead the latest callbacks in Effects without resubscribing
MEDIUMfabricahq/public-libraryRender client-only preferences without a flash or hydration error
MEDIUMfabricahq/public-libraryReuse request-independent server data across requests
MEDIUMfabricahq/public-libraryRun app-wide initialization once per app load
LOW-MEDIUMfabricahq/public-libraryRun post-response work after the response
MEDIUMfabricahq/public-libraryShare client data requests through a caching data layer
MEDIUM-HIGHfabricahq/public-librarySkip off-screen rendering work in long lists
MEDIUMfabricahq/public-libraryStream slow data behind Suspense boundaries
MEDIUM-HIGHfabricahq/public-librarySubscribe to and depend on only the values you use
MEDIUMfabricahq/public-librarySuppress only expected hydration mismatches
LOW-MEDIUMfabricahq/public-libraryUse a boolean condition for conditional rendering
LOW-MEDIUMfabricahq/public-libraryUse Activity to hide UI that should keep its state
MEDIUMfabricahq/public-libraryUse functional updates when new state depends on old state
MEDIUMfabricahq/public-library