Update/collapsible nav - forwardRef#49
Conversation
| // @ts-expect-error JSX element without construct | ||
| <Element |
There was a problem hiding this comment.
The remaining error. TypeScript sees div, nav, etc. as not being vaild JSX tags because (as far I can tell) as is optional, has a default value, is casted, and has a rather complex type.
There was a problem hiding this comment.
I feel like this is where optional TS props fail a bit. Like as can't actually be optional because it has to render an element. It's just optional for consumers since we provide a fallback/default.
…ate/collapsible-nav
cchaos
left a comment
There was a problem hiding this comment.
@thompsongl Is this good to merge, or were you still working?
Also, are you happy enough with this implementation to establish a good pattern for other components. Maybe add an example in the wiki somehwere?
|
This can be merged. I haven't been able to find to make this all work without at least one |
Down to a single TS error that I don't think is resolvable. Going to sit on this for a minute and see if anything comes to mind.