Collapsible JSON viewer in React

0
Remix

In an hour of React, pretty-print a JSON value (objects, arrays, strings, numbers) with indentation, and give every nested object and array a toggle that collapses it to a placeholder and expands it again. Build it as a recursive component, decide where the collapsed state lives, and handle empty objects and arrays.

NotionTechnical phone screenLast asked Jul 2025
No answer yet. Write the first one; the best answer gets endorsed.