diff --git a/.changeset/lucky-laws-relate.md b/.changeset/lucky-laws-relate.md new file mode 100644 index 00000000..1d50132e --- /dev/null +++ b/.changeset/lucky-laws-relate.md @@ -0,0 +1,7 @@ +--- +'@giphy/react-components': patch +--- + +In order to avoid console warnings, dont' use fetchPriority prop until next React release + +https://github.com/facebook/react/issues/27233 diff --git a/packages/react-components/package.json b/packages/react-components/package.json index 1465cdf4..d88c6351 100644 --- a/packages/react-components/package.json +++ b/packages/react-components/package.json @@ -35,8 +35,8 @@ "@storybook/react-vite": "^7.1.0", "@storybook/storybook-deployer": "^2.8.16", "@storybook/testing-library": "^0.2.0", - "@types/react": "^18.2.15", - "@types/react-dom": "^18.2.7", + "@types/react": "^18.2.79", + "@types/react-dom": "^18.2.25", "@types/storybook__react": "^5.2.1", "@types/throttle-debounce": "^2.1.0", "awesome-typescript-loader": "^5.2.1", diff --git a/packages/react-components/src/components/gif.tsx b/packages/react-components/src/components/gif.tsx index 3dcc42ea..6b1eb846 100644 --- a/packages/react-components/src/components/gif.tsx +++ b/packages/react-components/src/components/gif.tsx @@ -64,6 +64,8 @@ type GifProps = { borderRadius?: number tabIndex?: number style?: any + // issues with this will be resolved in the next React release: + // https://github.com/facebook/react/issues/27233 fetchPriority?: 'auto' | 'high' | 'low' } @@ -103,7 +105,6 @@ const Gif = ({ borderRadius = 4, style, tabIndex, - fetchPriority, }: Props) => { // only fire seen once per gif id const [hasFiredSeen, setHasFiredSeen] = useState(false) @@ -275,9 +276,6 @@ const Gif = ({ =16, @types/react@npm:^18.2.15": +"@types/react@npm:*, @types/react@npm:>=16": version: 18.2.15 resolution: "@types/react@npm:18.2.15" dependencies: @@ -5575,6 +5575,16 @@ __metadata: languageName: node linkType: hard +"@types/react@npm:^18.2.79": + version: 18.2.79 + resolution: "@types/react@npm:18.2.79" + dependencies: + "@types/prop-types": "*" + csstype: ^3.0.2 + checksum: 85aa96e0e88725c84d8fc5f04f10a4da6a1f507dde33557ac9cc211414756867721264bfefd9e02bae1288ce2905351d949b652b931e734ea24519ee5c625138 + languageName: node + linkType: hard + "@types/scheduler@npm:*": version: 0.16.3 resolution: "@types/scheduler@npm:0.16.3"