Q81. How do you add component-level CSS in Next.js?
Using CSS modules with a `.module.css` file extension. ``` // styles.module.css .example { color: red; font-size:18px; } // Component.js import styles from './styles.modu...
Technical Question Bank · Peer-Reviewed
Search and filter frequently asked interview questions across technical, programming, and behavioral domains. Tailor your interview preparation by difficulty for freshers or experienced developers (780 available).
Using CSS modules with a `.module.css` file extension. ``` // styles.module.css .example { color: red; font-size:18px; } // Component.js import styles from './styles.modu...
Web storage is an API that provides a mechanism by which browsers can store key/value pairs locally within the user's browser, in a much more intuitive fashion than using...
Below are the list of main advantages of React, 1. Increases the application's performance with _Virtual DOM_. 2. JSX makes code easy to read and write. 3. It renders bot...
Adding global CSS depends on whether you are using the modern **App Router** or the legacy **Pages Router**: ### 1. In App Router (`app/` directory): Import your global C...
Post message is a method that enables cross-origin communication between Window objects.(i.e, between a page and a pop-up that it spawned, or between a page and an iframe...
By installing Tailwind CSS and configuring it in the next.config.js file. ```bash npm install tailwindcss postcss autoprefixer npx tailwindcss init -p ``` Then, add the f...
A cookie is a piece of data that is stored on your computer to be accessed by your browser. Cookies are saved as key/value pairs. For example, you can create a cookie nam...
Rendering pages on each request. If a page uses Server-side Rendering, the page HTML is generated on each request. ```jsx export async function getServerSideProps() { con...
Cookies are used to remember information about the user profile(such as username). It basically involves two steps, 1. When a user visits a web page, the user profile can...
Pre-rendering pages at build time. If a page uses Static Generation, the page HTML is generated at build time. ```jsx export async function getStaticProps() { const res =...
HireXTech uses essential storage to remember your study preferences and third-party advertising cookies via Google AdSense in compliance with GDPR. You can choose to enable essential cookies only or accept all cookies. Read our Privacy Policy.