export type Setter in use-global.d.ts
rolandzwaga opened this issue · 2 comments
Is there a reason why the Setter type is not exported in use-global.d.ts?
I'm passing the setter to a child component and would like to strongly type the prop, but currently that's not possible since that type isn't exposed.
It was never expected to be passed around between components, since it is global state. The child would be able to useGlobal()
to generate the same function without a prop.
It's pretty safe, so I don't have any opposition to exposing it.
You are welcome to open a pull request to resolve this issue; or if you aren't comfortable doing that, please confirm that the child calling useGlobal
itself does not address your use case, and I'll try to make the commit this week.
ok, PR sent, thanks mate, I love the library by the way, use it a lot