diff --git a/snippets/Collapse.md b/snippets/Collapse.md index e182ca6da..58355fdf4 100644 --- a/snippets/Collapse.md +++ b/snippets/Collapse.md @@ -5,15 +5,15 @@ tags: components,children,state,intermediate Renders a component with collapsible content. -- Use the `React.setState()` hook to create the `isCollapsed` state variable with an initial value of `props.collapsed`. +- Use the `React.useState()` hook to create the `isCollapsed` state variable with an initial value of `collapsed`. - Use an object, `style`, to hold the styles for individual components and their states. -- Use a `
` to wrap both the `
); -} +}; ``` ```jsx