diff --git a/snippets/TreeView.md b/snippets/TreeView.md index bfebb0876..0a48dd5e2 100644 --- a/snippets/TreeView.md +++ b/snippets/TreeView.md @@ -4,7 +4,7 @@ Renders a tree view of a JSON object or array with collapsible content. Use object destructuring to set defaults for certain props. Use the value of the `toggled` prop to determine the initial state of the content (collapsed/expanded). -Use the `setState()` hook to create the `isToggled` state variable and give it the value of the `toggled` prop initially. +Use the `React.setState()` hook to create the `isToggled` state variable and give it the value of the `toggled` prop initially. Return a `