infy

Advantage of react

  1. Invoke API, display data in pagination, has Next and Previous buttons, and Includes a dropdown to choose how many records to show per page.

  2. Create a custom hook to resize the window size and show the height an width of window.

  3. Write a custom debounce function. Create a function with console and call that in debounce function.

  4. Create a Timer and update it from 10 to 0? Can you create a custom countdown timer?

  5. Invoke API, Display first 10 album titles in a list with checkboxes, Upon selection of atleast 5 items, enable submit button, Capitalize second letter of every word in the title

  6. Create a Comments Analytics – Chart by Post Instructions Build a React + TypeScript application that visualizes comment distribution. • The app must fetch posts and their comments. • Display a chart (bar or pie) showing the number of comments per post. • Use useMemo to compute counts efficiently when data changes. • Desktop: chart + table side by side. Mobile: chart stacked above table.

  7. You are given a nested tree data structure. Each node has an optional id, an array of classList, and children. Write recursive functions to search nodes by id and by className.

  8. Create a Todo List app where: You can add data. A Complete button is available for each task. On clicking the Complete button, the task is marked complete and the button becomes disabled.

  9. Implement "Load More" functionality and caching in React.

  10. Create a custom hook for API call, which will accept the base url.

  11. Design a component with 3 tabs and implement pagination to handle large data in a tab.

  12. Implement the Error boundaries in class component and show a error for a component.

Difference between useMemo and useCallback.

  1. What is a key in React? Why do we use it, and what happens if we don’t?

  2. What is difference between useLayoutEffect and useEffect?

  3. How do you manage state if your state is dependent on previous state?

  4. How do you optimize a react application? How lazy loading works? Where exactly is lazy loading beneficial?