All fields

“Client Components & Hydration” in Information Technology

29 questions across 2 technologies.

Information Technology

29 questions in 2 technologies

#QuestionTechnologyTopicLevel
1How do client components and server components work together in the same page? Next.js › Client Components & HydrationNext.jsClient Components & HydrationIntermediate
2How can you minimize the amount of JavaScript sent to the browser when using client components? Next.js › Client Components & HydrationNext.jsClient Components & HydrationAdvanced
3What is a client component in Next.js and when should you use one? Next.js › Client Components & HydrationNext.jsClient Components & HydrationBeginner
4What is hydration in the context of Next.js and React? Next.js › Client Components & HydrationNext.jsClient Components & HydrationBeginner
5What causes a hydration mismatch error, and how can you fix one? Next.js › Client Components & HydrationNext.jsClient Components & HydrationIntermediate
6Why can't server components use hooks like useState or useEffect? Next.js › Server ComponentsNext.jsServer ComponentsBeginner
7How do you decide whether a specific piece of a page should be a server component or a client component? Next.js › Server ComponentsNext.jsServer ComponentsIntermediate
8How do styled components or other CSS in JS libraries work in the Next.js App Router, given the presence of server components? Next.js › Styling in Next.js (CSS Modules, Tailwind & Styled Components)Next.jsStyling in Next.js (CSS Modules, Tailwind & Styled Components)Intermediate
9What data types and values can be safely passed as props from a server component to a client component? Next.js › Server ComponentsNext.jsServer ComponentsAdvanced
10Why is it important to never expose sensitive information like API keys inside client components? Next.js › Security Best Practices in Next.jsNext.jsSecurity Best Practices in Next.jsBeginner
11What is a Client Component and when do you need one instead of a Server Component? React › Server ComponentsReactServer ComponentsBeginner
12What is a server component in the Next.js App Router, and why is it the default? Next.js › Server ComponentsNext.jsServer ComponentsBeginner
13How do you fetch data inside a client component that needs to run in the browser? Next.js › Data FetchingNext.jsData FetchingBeginner
14How can you pass data fetched on the server down into a client component? Next.js › Data FetchingNext.jsData FetchingIntermediate
15How do you call a server action directly from a button click inside a client component, rather than through a form submission? Next.js › Server Actions & MutationsNext.jsServer Actions & MutationsIntermediate
16How do you share state between multiple components that are not directly related, such as a shopping cart shown in both the header and a product page? Next.js › State Management in Next.js AppsNext.jsState Management in Next.js AppsIntermediate
17What is the difference between a regular environment variable and one prefixed with NEXT_PUBLIC in Next.js? Next.js › Environment Variables & Configuration ManagementNext.jsEnvironment Variables & Configuration ManagementBeginner
18How do you create a custom error page for a specific route segment in the App Router? Next.js › Error Handling & Not Found PagesNext.jsError Handling & Not Found PagesBeginner
19What is the difference between a layout and a template in the Next.js App Router? Next.js › Layouts & TemplatesNext.jsLayouts & TemplatesBeginner
20What is local component state, and when is it enough for managing data in a Next.js application? Next.js › State Management in Next.js AppsNext.jsState Management in Next.js AppsBeginner
21How do you write a basic unit test for a component in a Next.js application? Next.js › Testing Next.js ApplicationsNext.jsTesting Next.js ApplicationsBeginner
22Why can you not use React hooks like useState inside the custom Document component? Next.js › Custom App & Document in Pages RouterNext.jsCustom App & Document in Pages RouterIntermediate
23How does the global-error.js file differ from a regular error.js file in the App Router? Next.js › Error Handling & Not Found PagesNext.jsError Handling & Not Found PagesIntermediate
24How do you validate form data on the server before saving it, and show validation errors back to the user? Next.js › Form Handling & Validation in Next.jsNext.jsForm Handling & Validation in Next.jsIntermediate
25How do you programmatically navigate to a different page in response to a user action, such as after a successful form submission? Next.js › Routing (App/Pages Router)Next.jsRouting (App/Pages Router)Intermediate
26How do you protect a Next.js application against cross site scripting attacks? Next.js › Security Best Practices in Next.jsNext.jsSecurity Best Practices in Next.jsIntermediate
27When would you reach for a dedicated state management library, like Zustand or Redux, instead of just using React Context? Next.js › State Management in Next.js AppsNext.jsState Management in Next.js AppsIntermediate
28How do you use the useReportWebVitals hook to collect performance data from real visitors on your Next.js site? Next.js › Web Vitals & Performance MonitoringNext.jsWeb Vitals & Performance MonitoringIntermediate
29How would you combine parallel routes and intercepting routes together to build a modal that overlays the current page? Next.js › Parallel Routes & Intercepting RoutesNext.jsParallel Routes & Intercepting RoutesAdvanced