Last active
August 11, 2023 13:19
-
-
Save yuheiy/6e74d175771b19bbfd0c62ee08005cf5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function App() { | |
return ( | |
<> | |
{(() => { | |
const [isOpen, setOpen] = useState(false); | |
return ( | |
<> | |
<Button onClick={() => setOpen(true)}>First</Button> | |
<Popover isOpen={isOpen} onOpenChange={setOpen}> | |
... | |
</Popover> | |
</> | |
); | |
})()} | |
{(() => { | |
const [isOpen, setOpen] = useState(false); | |
return ( | |
<> | |
<Button onClick={() => setOpen(true)}>Second</Button> | |
<Popover isOpen={isOpen} onOpenChange={setOpen}> | |
... | |
</Popover> | |
</> | |
); | |
})()} | |
{(() => { | |
const [isOpen, setOpen] = useState(false); | |
return ( | |
<> | |
<Button onClick={() => setOpen(true)}>Third</Button> | |
<Popover isOpen={isOpen} onOpenChange={setOpen}> | |
... | |
</Popover> | |
</> | |
); | |
})()} | |
</> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment