React_NextJS_CheatSheet (1)
React_NextJS_CheatSheet (1)
useEffect(): Runs side effects like API calls after component renders.
Fragment: Used to group multiple elements without adding extra DOM nodes.
Higher Order Component: Function that takes a component and returns a new one.
File-based Routing: Pages are created based on files in the 'pages/' folder.
Image Optimization: Built-in support via next/image for fast image loading.
Head Component: Use next/head to modify <head> like title, meta tags.
Public Directory: Static assets like images are served from /public.
Static Site Generation: Pages built once at build time, served as static HTML.
Server Side Rendering: Page generated on each request with fresh data.
Fallback Rendering: Allows dynamic page generation at request time with loading UI.