diff --git a/examples/with-ant-design/app/AntdRegistry.tsx b/examples/with-ant-design/app/AntdRegistry.tsx index 10205c46bd3e3..1dd6cdb84d157 100644 --- a/examples/with-ant-design/app/AntdRegistry.tsx +++ b/examples/with-ant-design/app/AntdRegistry.tsx @@ -3,13 +3,14 @@ import React from 'react' import { useServerInsertedHTML } from 'next/navigation' import { StyleProvider, createCache, extractStyle } from '@ant-design/cssinjs' +import type Entity from '@ant-design/cssinjs/es/Cache' interface StyledRegistryProps { children: React.ReactNode } const StyledComponentsRegistry = ({ children }: StyledRegistryProps) => { - const cache = createCache() + const cache = React.useMemo(() => createCache(), []) useServerInsertedHTML(() => (