15 questions for “Conditional Rendering & Lists (Keys)”

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

Information Technology

15 questions in 2 technologies

#QuestionTechnologyTopicLevel
1How do you conditionally render one of several possible components cleanly, without a long chain of if statements? React › Conditional Rendering & Lists (Keys)ReactConditional Rendering & Lists (Keys)Advanced
2How do you show different content in React depending on a condition? React › Conditional Rendering & Lists (Keys)ReactConditional Rendering & Lists (Keys)Beginner
3How do you render a list of items in React using the map function? React › Conditional Rendering & Lists (Keys)ReactConditional Rendering & Lists (Keys)Beginner
4Why is using an array's index as a key generally considered a bad practice? React › Conditional Rendering & Lists (Keys)ReactConditional Rendering & Lists (Keys)Intermediate
5How do you render a fallback message when a list is empty? React › Conditional Rendering & Lists (Keys)ReactConditional Rendering & Lists (Keys)Intermediate
6How would you use a keyed Fragment when rendering a list of grouped elements? React › Portals & FragmentsReactPortals & FragmentsIntermediate
7How would you conditionally apply different CSS classes based on a component's state, such as showing an active style? React › Styling in React (CSS Modules, Styled Components & Tailwind)ReactStyling in React (CSS Modules, Styled Components & Tailwind)Advanced
8What is a simple real world example of when useMemo actually helps a React app? React › Performance (memo/useMemo)ReactPerformance (memo/useMemo)Beginner
9What is a Fragment in React and why would you use one instead of a div? React › Portals & FragmentsReactPortals & FragmentsBeginner
10How does the new at for control flow block work, and why does it require a track expression? Angular › New Control Flow Syntax (@if, @for & @switch)AngularNew Control Flow Syntax (@if, @for & @switch)Beginner