Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Its instance type 'ReactGrid' is not a valid JSX element. #107

Closed
nirmaanlabs opened this issue Jun 27, 2022 · 5 comments
Closed

Its instance type 'ReactGrid' is not a valid JSX element. #107

nirmaanlabs opened this issue Jun 27, 2022 · 5 comments

Comments

@nirmaanlabs
Copy link

Describe the bug
A clear and concise description of what the bug is.

'ReactGrid' cannot be used as a JSX component.
  Its instance type 'ReactGrid' is not a valid JSX element.
    Type 'ReactGrid' is missing the following properties from type 'ElementClass': context, setState, forceUpdate, props, refs
    45 |   const columns = getColumns();
    46 |
  > 47 |   return <ReactGrid rows={rows} columns={columns} />;
       |           ^^^^^^^^^
    48 | }
    49 |

image

I copy pasted code from getting started
using react 18.2.0

  • Device: desktop
  • OS: Windows
  • Browser: chrome
@SimantoR
Copy link

SimantoR commented Jul 9, 2022

This is due to the fact that ReactGrid is written as class components and I think react@18 depricates class components. I do want to start a PR to convert it into functional components. There seems to be other depricated depenencies as well that would either need to be updated or removed all together. Looking for advice from maintainer. This is a very useful tool and I'd like to get a PR started with some guidance.

@czerwiukk
Copy link
Contributor

Hello guys! The ReactGrid's codebase is quite old. There are classes like PointerEventsController that should be completely rewritten to hooks to apply such logic in functional components.
Currently we are working on a new version of ReactGrid from scratch, using relevant syntax and practices. We've got limited resources for that project, but we strive to announce it as soon as it's possible.

@MarcoDeJong
Copy link

If you want collaborators for that work, it might be usefull to push this to a development branch

@ChristoRibeiro
Copy link

@czerwiukk are you looking for contributors? Is the new version available somewhere?

@DLowHP
Copy link
Collaborator

DLowHP commented Jul 26, 2023

Hi! When it comes to the mentioned issue I believe it should work now after updating react-scripts (see PR#193).

As for questions about new version - we had to postpone this because many people are still using the current version so we need to address current issues first before introducing breaking changes and a whole new architecture. When the time comes you’ll most likely see our work in on a separate branch or somewhere 😄

Thanks for sharing your thoughts. Take care!

@DLowHP DLowHP closed this as completed Jul 26, 2023
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

No branches or pull requests

6 participants