FC ↔ function to return UI via JSX. Pass propsfor dynamic input. add state via Hook
aka FC, Function-Component, Functional-Component
since React 16.8 FC with Hooks are more powerful than CC
Pure Component
stateless Component that always renders same based on same props input.
Updater Function
function call by Component to update state value
References
ReactComponentElement↔ Type for React CC or FCHook↔ Specialized Function Functionally extends FC with Lifecycle Method & persistent statereturn(...JSX)↔ to return some UI from FC (typically described using JSX)useState()↔ Stateful Hook to persist single state value in FCuseRef()↔ Stateful Hook to persist Passive State Variable across renders in FC, asrefhandle Escape Hatch to DOM API elementsPopularity↔ greater ecosystem support & DX for FCClient Component↔ FC to render on Client dynamicallyDependency↔ any Variable local to FC Scope to control Hook TriggeruseEffect()↔ Hook to run Effect in FC at specific stage of Component Lifecycle, set by Deps ArrayServer Component↔ FC to Server Side Render on Backend & serve Static Content to Thin ClientStateful Hook↔ (typeof) Hook to add state to FCLazy()↔ React API function to Lazy Load FC for Suspense BoundarySuspense API↔ React API to defer render for FCProvider↔ Wrapper FC to provideContextvalueto all SubscribingchildrenPage↔export defaultFC to display unique UI fornextFile System Router<Head>↔ ( Next 12 ) FC extends<head\><Script\>↔ ( Next 12 ) FC extends<script\>to optimize fetch/priority & load strategy<Image>↔ ( Next 12 ) FC extends<img\>with Prefetch/Lazy Load & ✨img optimization to burn your free quota<Link\>↔ ( Next 12 ) FC extends<a\>with PrefetchReactDOMServer↔ReactDOM APIInterface Object to render FC to static HTMLto use [Error Boundary](error-boundary), only avail in [CC](cc)↔ Error Boundary now available in FC via Next 13!React Router FC↔React Router APIprebuild FC<Route>↔ React Router FC to map route forelementFC topath<RequireAuth>↔ custom FC Wrapper to Declaratively control Protected Route viauseAuth()&<Navigate\>fromreact-router-dom/src/components/App.js↔ root JS file to define App FC to import other Componentscomponent↔ name of FC import name - must matc or nothing shows in Storybook Concurrent Explorer!Story↔export defaultObject 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" /\>
<Split>↔react-splitFC to wrap children with options[id].tsx↔ ( Next 12 ) FC toexport defaultPage with Dynamic Route with_idURL Parameterreact-markdown↔ React Lib FC Wrapper to render MDX extends with pluginsFile System Router↔ to define Routing by filepath struct; to map FC src path to route@storybook/addon-a11y↔ official storybook Addon to audit FC vs WCAG guidelines for max Accessibility & flag any violationssrc/components/HomepageFeatures/index.tsx↔docusaurusFC for root home page (classic preset)