Resolve type errors when using the library in a typescript react application#1
Resolve type errors when using the library in a typescript react application#1jstolwijk wants to merge 2 commits intorough-stuff:mainfrom
Conversation
|
Thanks for this! I just tried using wired-elements-react and it's great, but the type definitions have some serious issues. I tried this PR and it solves the const WB = WiredButton as any;
return <WB onClick={handleClick}>click me</WB>this works correctly but is obviously not ideal. I know React pretty well but I am not at all familiar with |
|
After playing around with this some more, I think this wrapper is really hard to work with. I'm dropping it from my prototype.The elements are inconsistent and don't conform to React conventions (e.g., the WiredComboBox has an |
@lit-labs/react v1.0.0-rc.1generates invalid typescript type definitions, this issue seems to be resolved in rc.2Example
Results in the following error: