export component's context hook
See original GitHub issueFeature request
export component’s context
Overview
I creating theme props for accordion component and I can not get current component’s state for my custom Arrow component. For example, accordion component has useAccordionValueContext
Examples in other libraries
Who does this impact? Who is this for?
Advanced
Additional context
My example and my Arrow component

Issue Analytics
- State:
- Created a year ago
- Comments:7
Top Results From Across the Web
Using React context with a custom hook
Using React context with a custom hook. React Context is a great, builtin API for passing data from a parent component to any...
Read more >Context - React
Context. Context provides a way to pass data through the component tree without having to pass props down manually at every level.
Read more >How and When to Use Context in React with Hooks
Context allows you to pass data across any number of React components, regardless of nesting. Redux or Context? In a very small application,...
Read more >An Example: Use Context and Hooks to share state between ...
We export the following three from this file: The Context This will be used by other components through the useContext Hook; The Provider:....
Read more >React Context Provider Hook Pattern - NimbleWebDeveloper
React Context Provider Hook Pattern - Share Context via Custom Hook. ... import {createContext, useState} from React; export const SomeContext ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Yeah I can understand your perspective here, as @benoitgrelard mentioned we want to limited the api surface but this can add additional complexity in some cases, especially if you then need to share this controlled value with other components e.g. in an open api design system.
Thanks for your feedback 🙏
@QzCurious The open state is already available to you via the controlled props:
https://codesandbox.io/s/tailwind-transition-6pwf41?file=/src/App.js