Home > OS >  Add default open logic for a react Collapse component
Add default open logic for a react Collapse component

Time:09-16

I created this react Collapse component with react-spring which have the open and close functionality.

I want to have a defaultOpen prop, so the content stays open on initial render then it use isOpen state for closing and opening.

How can i do that?

here is a codesandbox link: Edit eloquent-mccarthy-ce2w7

  • Related