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

Check upgrade to React 19 #652

Open
JonasKellerer opened this issue Jan 14, 2025 · 0 comments · May be fixed by #673
Open

Check upgrade to React 19 #652

JonasKellerer opened this issue Jan 14, 2025 · 0 comments · May be fixed by #673
Assignees
Labels
components Regarding the components

Comments

@JonasKellerer
Copy link
Collaborator

We currently use React 18 in our example, and also to define the JSX interface.

declare global {
    // eslint-disable-next-line @typescript-eslint/no-namespace
    namespace JSX {
        interface IntrinsicElements {
            'gs-location-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
        }
    }
}

The syntax now changed: https://react.dev/blog/2024/04/25/react-19-upgrade-guide#the-jsx-namespace-in-typescript

Now one should use

declare module "react" {
  namespace JSX {
    interface IntrinsicElements {
      "my-element": {
        myElementProps: string;
      };
    }
  }
}

Investigate, If we can use the new syntax, while still being able to use the components in react 18.

@JonasKellerer JonasKellerer added the components Regarding the components label Jan 14, 2025
@fengelniederhammer fengelniederhammer self-assigned this Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
components Regarding the components
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants