MCPcopy Create free account
hub / github.com/TanStack/devtools / JsonTree

Function JsonTree

packages/devtools-ui/src/components/tree.tsx:14–35  ·  view source on GitHub ↗
(props: {
  value: TData
  copyable?: boolean

  defaultExpansionDepth?: number
  collapsePaths?: Array<TName>

  config?: { dateFormat?: string }
})

Source from the content-addressed store, hash-verified

12// utils
13import type { CollapsiblePaths } from '../utils/deep-keys'
14
15export function JsonTree<TData, TName extends CollapsiblePaths<TData>>(props: {
16 value: TData
17 copyable?: boolean
18
19 defaultExpansionDepth?: number
20 collapsePaths?: Array<TName>
21
22 config?: { dateFormat?: string }
23}) {
24 return (
25 <JsonValue
26 isRoot
27 value={props.value}
28 copyable={props.copyable}
29 depth={0}
30 defaultExpansionDepth={props.defaultExpansionDepth ?? 1}
31 path=""
32 collapsePaths={props.collapsePaths}
33 config={props.config}
34 />
35 )
36}
37
38function JsonValue(props: {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected