Skip to content

Commit

Permalink
React 19 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
garronej committed Dec 9, 2024
1 parent c1480eb commit fb94191
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { JSX } from "./tools/JSX";
import React, { memo, forwardRef, type ReactNode, type CSSProperties } from "react";
import { getLink } from "./link";
import type { RegisteredLinkProps } from "./link";
Expand Down
1 change: 1 addition & 0 deletions src/Header/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable no-inner-declarations */
import type { JSX } from "../tools/JSX";
import React, {
memo,
forwardRef,
Expand Down
1 change: 1 addition & 0 deletions src/Modal/Modal.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { JSX } from "../tools/JSX";
import React, { memo, forwardRef, type CSSProperties, type ReactNode } from "react";
import { fr } from "../fr";
import { cx } from "../tools/cx";
Expand Down
1 change: 1 addition & 0 deletions src/SearchBar/SearchBar.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { JSX } from "../tools/JSX";
import React, { memo, forwardRef, type CSSProperties } from "react";
import { symToStr } from "tsafe/symToStr";
import { assert } from "tsafe/assert";
Expand Down
1 change: 1 addition & 0 deletions src/Summary.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { JSX } from "./tools/JSX";
import React, { memo, forwardRef, useId, type CSSProperties } from "react";
import { symToStr } from "tsafe/symToStr";
import { assert } from "tsafe/assert";
Expand Down
1 change: 1 addition & 0 deletions src/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { JSX } from "./tools/JSX";
import { useMemo } from "react";
import { capitalize } from "tsafe/capitalize";

Expand Down
6 changes: 6 additions & 0 deletions src/tools/JSX.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import type { ReactElement } from "react";

export namespace JSX {
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface Element extends ReactElement<any, any> {}
}

0 comments on commit fb94191

Please sign in to comment.