Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumReactrecursion in componentsSingle-choice MCQ

A recursive renderer walks an arbitrary data object. To guard against pathological depth you want to stop recursing past a limit. Which of these is the correct, render-safe way to cap recursion depth?

function Node({ value, depth = 0 }) { // ... }