v7.0.0
Major Changes
-
#333
87a9b1eThanks @stipsan! -<PortableText>now ships as two builds selected by export conditions: thedefaultbuild is optimized with React Compiler auto-memoization, and an uncompiled build serves thereact-servercondition, since React Server Components refuse to load compiled output (facebook/react#31702):".": { "types": "./dist/index.d.ts", "react-server": "./dist/index.react-server.js", "default": "./dist/index.js" }
There are no API changes. Client components and SSR get the compiled build, with finer-grained memoization than the manual
useMemocalls it replaces, and server components render the same source uncompiled — they render exactly once, so memoization can never pay off there.BREAKING: React 19 is now required (
peerDependencies.reactis^19) — the compiled build loadsreact/compiler-runtime, which only exists in React 19. Stay on@portabletext/react@6if you are on React 18.