10 questions for “Refs”

Found in 1 field. Select a question to see its full answer.

Information Technology

10 questions in 1 technology

#QuestionTechnologyTopicLevel
1What is a ref in React and what is it used for? React › Refs, useRef & forwardRefReactRefs, useRef & forwardRefBeginner
2What is the difference between a ref created with useRef and one created with createRef? React › Refs, useRef & forwardRefReactRefs, useRef & forwardRefBeginner
3How is useRef different from useState when it comes to storing a value? React › Refs, useRef & forwardRefReactRefs, useRef & forwardRefIntermediate
4How would you use a ref to keep track of a component's previous prop value? React › Refs, useRef & forwardRefReactRefs, useRef & forwardRefIntermediate
5What is forwardRef and why is it needed when passing a ref to a custom component? React › Refs, useRef & forwardRefReactRefs, useRef & forwardRefAdvanced
6What is an uncontrolled form input, and how does it differ from a controlled one? React › Forms: Controlled & Uncontrolled ComponentsReactForms: Controlled & Uncontrolled ComponentsBeginner
7What is useLayoutEffect and how is it different from the regular useEffect hook? React › Concurrent Hooks (useTransition, useDeferredValue & useLayoutEffect)ReactConcurrent Hooks (useTransition, useDeferredValue & useLayoutEffect)Intermediate
8How do event bubbling and Portals interact with each other in React? React › Portals & FragmentsReactPortals & FragmentsIntermediate
9How would you manage focus properly in a React modal to keep it accessible? React › Accessibility (a11y) in ReactReactAccessibility (a11y) in ReactAdvanced
10How would you build a tooltip using a Portal so it always appears above everything else on the page? React › Portals & FragmentsReactPortals & FragmentsAdvanced