Skip to content

Commit 1520a75

Browse files
committed
Corrections and additions
* Add React Compiler section * Clarify some existing parts of release-notes.md
1 parent 0afad0e commit 1520a75

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

release-notes.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,10 @@ if (dataState === 'complete') {
8888

8989
### `@defer` Support Evolution
9090

91-
Apollo Client v4 introduces a pluggable incremental delivery system for the `@defer` directive. This gives developers the flexibility to define which incremental delivery protocol to use, with the flexibility needed to adapt to any further specification changes.
91+
Apollo Client v4 introduces a pluggable incremental delivery system for the `@defer` directive. This gives developers the flexibility to define which incremental delivery protocol to use without sacrificing compatibility with any further specification changes. Please note that Apollo Client 4.0 intentionally does not specifcy a default implementation since incremental delivery is still not merged into the draft GraphQL specification. Users must opt into a specific protocol version.
9292

9393
**Pluggable Implementation:**
9494
- Configure incremental delivery through the `incrementalHandler` option
95-
- Ships without a default implementation for maximum flexibility
9695
- Available handlers:
9796
- `NotImplementedHandler` (default)
9897
- `Defer20220824Handler` (Apollo Router format)
@@ -166,6 +165,24 @@ All React-related exports have moved to dedicated entrypoints:
166165

167166
In previous versions, users sometimes inadvertently imported React modules through seemingly unrelated paths. In v4 we resolve these footguns to make it more transparent when React-only modules are being imported.
168167

168+
**React Compiler Support (Experimental):**
169+
Apollo Client v4 ships with React Compiler-optimized hooks available at `@apollo/client/react/compiled`. This experimental feature provides:
170+
- Pre-compiled React hooks optimized by the React Compiler
171+
- Drop-in replacement for standard React hooks
172+
- Potential performance improvements in React 19+ applications
173+
- Same API surface as `@apollo/client/react`
174+
175+
To use the compiled hooks:
176+
```typescript
177+
// Instead of importing from @apollo/client/react
178+
import { useQuery, useMutation } from '@apollo/client/react/compiled';
179+
180+
// Use exactly the same as before - the API is identical
181+
const { data, loading } = useQuery(MY_QUERY);
182+
```
183+
184+
Note: This is an experimental optimization. The standard `@apollo/client/react` hooks remain the recommended default for most applications.
185+
169186
### Modern Package Format
170187

171188
- Ships both ESM and CJS formats

0 commit comments

Comments
 (0)