casesandberg / casesandberg/react-color

React 18 typescript problem

Open
#855 12 comments 29 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.3k
Forks
920
PR merge metrics
No merged PRs in 30d

Description

React has tightened it¤s typing restrictions in v18 and as a result there are a several typescript errors in the project:

```
TS2786: 'Saturation' cannot be used as a JSX component.
Its instance type 'Saturation' is not a valid JSX element.
The types returned by 'render()' are incompatible between these types.
Type 'import("/node_modules/@types/react-dom/node_modules/@types/react/index").ReactNode' is not assignable to type 'React.ReactNode'.
```

```
TS2786: 'Hue' cannot be used as a JSX component.
Its instance type 'Hue' is not a valid JSX element.
The types returned by 'render()' are incompatible between these types.
Type 'import("/node_modules/@types/react-dom/node_modules/@types/react/index").ReactNode' is not assignable to type 'React.ReactNode'.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.