Skip to content

Conversation

eternalconcert
Copy link
Contributor

Hi!

When I tried the examples, I got the error

TS2786: 'ReactSketchCanvas' cannot be used as a JSX component.
Its instance type 'ReactSketchCanvas' is not a valid JSX element.
Type 'ReactSketchCanvas' is missing the following properties from type 'ElementClass': context, setState, forceUpdate, props, and 2 more

I am using

typescript 4.3.5
React 17.0.2
Node 16.5.0

With these small changes, the errors are gone.

@vinothpandian
Copy link
Owner

Hi @eternalconcert,

Thank you for the PR. Can you please let me know in which version did you encounter this issue?

@eternalconcert
Copy link
Contributor Author

Hi @vinothpandian,

I came across this issue in the currently released version 5.3.4 as well as in a build from the latest sources.

@vinothpandian
Copy link
Owner

Thank you @eternalconcert. Unfortunately, I made a silly mistake of publishing and retracting v6 so the codebase is not up to date. Merge your PR once I clean it up!

@StevenDeRoover
Copy link

Is this going to be implemented in version 5.x.x.x?

I am too trying v5.3.4, with the same issue.

@vinothpandian vinothpandian merged commit 98af828 into vinothpandian:master Oct 20, 2021
@vinothpandian
Copy link
Owner

vinothpandian commented Oct 20, 2021

@eternalconcert Thanks again for the PR

@StevenDeRoover v6 is taking more time than I expected. I have merged this PR and released it as v5.3.5

@StevenDeRoover
Copy link

@vinothpandian lots of thanks!

@vinothpandian vinothpandian mentioned this pull request Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants