Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.

fix(next): invalid CJS React import (#3405)

authored by

Jovi De Croock and committed by
GitHub
f66de5be c35e7a98

+8 -3
+5
.changeset/hungry-rings-switch.md
··· 1 + --- 2 + '@urql/next': patch 3 + --- 4 + 5 + Fix invalid CJS by importing react with import-all semantics
+1 -1
packages/next-urql/src/DataHydrationContext.ts
··· 1 - import React from 'react'; 1 + import * as React from 'react'; 2 2 import { ServerInsertedHTMLContext } from 'next/navigation'; 3 3 import type { UrqlResult } from './useUrqlValue'; 4 4
+1 -1
packages/next-urql/src/Provider.ts
··· 1 1 'use client'; 2 2 3 - import React from 'react'; 3 + import * as React from 'react'; 4 4 import type { SSRExchange, Client } from 'urql'; 5 5 import { Provider } from 'urql'; 6 6 import { DataHydrationContextProvider } from './DataHydrationContext';
+1 -1
packages/next-urql/src/useUrqlValue.ts
··· 1 1 'use client'; 2 2 3 - import React from 'react'; 3 + import * as React from 'react'; 4 4 import { useDataHydrationContext } from './DataHydrationContext'; 5 5 import { SSRContext } from './Provider'; 6 6