What is the difference between controlled and uncontrolled components in React? When is it better to use uncontrolled components?
Frontend
Determine the order of output to the console for code using async/await and setTimeout.
The developer received a JWT token after login. What should be done with it? Where is the best place to store the token — in localStorage or in a cookie? How to store the token in a cookie?
If a component has no props, will it re-render?
Suppose ID numbers do not come from the backend. How would you deal with this?
How is a state manager (e.g., Redux) better than just split contexts?
How to secure the sum calculation function if the backend can send incorrect data (undefined, strings instead of numbers)?
There is an array of users displayed via map. Where is the error and what is missing?
There are two components: App and Child. Child is inside App and wrapped in memo. In App, there is a user object passed to Child as a prop, and a button that changes count. What happens when you press the button? How to make Child not re-render?
Everything is done correctly: the backend set an HTTP-only cookie. But when refreshing the page, the cookie is lost. What could be the problem?
Determine the order of console output for code using setTimeout and Promise (Event Loop task).
What makes RTK Query or React Query better than regular fetch for requests? How does the frontend understand when it needs to update data?
Task Two Sum: given an array of numbers and a target number, find the indices of two numbers whose sum equals the target. What is the complexity of your solution?
The backend receives tabular data in the form of an array of objects. Write a function to calculate the sum of the 'amount' field.
A beginner developer created one large useContext for the entire application and uses it in all components. What problems might they face? What tools can help overcome this problem?
How to handle a function passed as a prop to a child component to avoid unnecessary re-renders?
Why is the key (key) in lists necessary in React?