Typing errors when using headlessui/react with preact #4068
Unanswered
kurtbuilds
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Your first issue seems to be that After that though, you'll run into an issue where |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm getting type errors when working with
@headlessui/react
components. This is a repo to reproduce the issue: https://github.com/kurtbuilds/preact-headlessui-issue.gitI'm not sure if I've misconfigured typescript/preact/something else, or this is a bug in preact. It seems like the former, but I'm not sure.
Any ideas on how to resolve this? Description here:
I created a component
Header
that usesDisclosure
from@headlessui/react
:However,
typescript
doesn't pass typechecking for this component, complaining that:Clearly, it should allow a
string
to be passed there.Beta Was this translation helpful? Give feedback.
All reactions