-
-
Notifications
You must be signed in to change notification settings - Fork 2k
JSX type errors on React Bootstrap 2.x & Preact 10.x #4425
Copy link
Copy link
Closed
Labels
Description
- Check if updating to the latest Preact version resolves the issue
Describe the bug
Every React Bootstrap component with Preact has a similar error as shown below:
'Container' cannot be used as a JSX component.
Its type 'BsPrefixRefForwardingComponent<"div", ContainerProps>' is not a valid JSX element type.
Type 'BsPrefixRefForwardingComponent<"div", ContainerProps>' is not assignable to type 'FunctionComponent<any>'.
Type 'ComponentChild' is not assignable to type 'VNode<any>'.
Type 'string' is not assignable to type 'VNode<any>'.ts(2786)
To Reproduce
- Real World scaffold: https://github.com/idea2app/React-MobX-Bootstrap-ts
- Minimal reproduce: https://codesandbox.io/p/devbox/preact-react-bootstrap-llqsv9?file=%2Fsrc%2Findex.tsx%3A5%2C14
Steps to reproduce the behavior
git clone https://github.com/idea2app/React-MobX-Bootstrap-tsnpm inpx tsc --noEmit
Expected behavior
No type errors as React does.
Reactions are currently unavailable