Lazy loading in React routes means loading a component only when the user navigates to that route, instead of loading all route components during the initial page load.
Route protection in React means restricting access to certain pages based on authentication or authorization.
In React applications, both BrowserRouter and HashRouter are used for client-side routing in React Router.
The main difference is how the URL is handled.
React Router is a library used for client-side routing in React applications.
It allows users to navigate between pages/components without reloading the entire webpage.
Instead of requesting a new HTML page from the server, React Router dynamically updates the UI based on the URL.
Flux Architecture is a unidirectional data flow pattern introduced by Facebook (now Meta) to manage complex state in frontend applications, especially when UI interactions and state updates become hard to track in large apps.
In interviews, the key is to explain it simply, then highlight its flow and why it is used.
Redux Saga is a middleware library for Redux used to handle side effects (like API calls, asynchronous operations, and background tasks) in a more manageable and readable way using ES6 generator functions.
It is mainly used in large applications where handling async logic inside components or reducers becomes hard to maintain.
Redux Thunk is a middleware for Redux that allows you to write asynchronous logic (like API calls) inside Redux action creators.
In normal Redux, actions must return a plain JavaScript object. But with Redux Thunk, action creators can return a function instead of an object. This function can perform async operations and dispatch actions later.
In Redux (interview perspective), middleware is a concept used to extend Redux functionality by intercepting actions before they reach the reducer.
Redux Toolkit (RTK) is the official, recommended way to write Redux logic in modern applications. It simplifies traditional Redux by reducing boilerplate code and enforcing best practices.
In Redux, a reducer is one of the most important core concepts. Interviewers usually expect you to explain it clearly with its role in state management, purity, and immutability.
