question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[useDisclosure hook] getButtonProps and getDisclosureProps are not documented

See original GitHub issue

Subject

useDisclosure

Description

The getButtonProps and getDisclosureProps functions returned by the useDisclosure hook are not mentioned in the documentation, neither are they used in any code example. This is a pity, since they are quite handy 🚀

Can you add some documentation on them with examples on how they could be used?

Thanks!

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
noobinthisgamecommented, May 5, 2022

@TylerAPfledderer We are not merging against main anymore. Everything goes into next until v2 is released. Merging it into next ist fine, docs will update accordingly once we merge next into main. If you ment the main repository.

1reaction
TylerAPfledderercommented, May 3, 2022

I’m going to go ahead and work on a PR to prevent this issue from going stale, and go from there with any review or additional input. 😄

Because these getter methods return specific values, handlers, and state to be passed to a button and the affected component for simple toggling, they can be presented as the “starting point” in the use of this hook, and then discuss the other return props for more refined control.

Read more comments on GitHub >

github_iconTop Results From Across the Web

useDisclosure - Chakra UI
useDisclosure is a custom hook used to help handle common open , close , or toggle scenarios. It can be used to control...
Read more >
The documentation for useDisclosure hook #2530 - GitHub
When I check the migration guide to V1 about the useDisclosure hook: useDisclosure now accepts object instead of boolean as initial values.
Read more >
Using the Chakra-UI useDisclosure hook on both a parent and ...
You can use the hook useDisclosure inside the parent component, then pass the state isOpen and onClose to your child component:
Read more >
useDisclosure - Chakra UI - YouTube
"Chakra UI is a simple, modular and accessible component library that gives you the building blocks you need to build your React ...
Read more >
Using the Chakra-UI useDisclosure hook on both a ... - Reddit
I am trying to use the Chakra UI useDisclosure hook accross two different components. Basically, I have a parent component with a button...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found