Skip to content

Commit bfb5a67

Browse files
Update migration guide
1 parent ee6a085 commit bfb5a67

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

docs/upgrade-to-6.0.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,34 @@ The [panel](https://service-manual.nhs.uk/design-system/components/panel) compon
3131

3232
This replaces the [list panel component](#list-panel) which was removed in NHS.UK frontend v6.0.0.
3333

34+
### Support for React Server Components (RSC)
35+
36+
All components have been tested as React Server Components (RSC) but due to [multipart namespace component limitations](https://ivicabatinic.from.hr/posts/multipart-namespace-components-addressing-rsc-and-dot-notation-issues) an alternative syntax (without dot notation) can be used as a workaround:
37+
38+
```patch
39+
<Pagination>
40+
- <Pagination.Link href="/section/treatments" previous>
41+
+ <PaginationLink href="/section/treatments" previous>
42+
Treatments
43+
- </Pagination.Link>
44+
+ </PaginationLink>
45+
- <Pagination.Link href="/section/symptoms" next>
46+
+ <PaginationLink href="/section/symptoms" next>
47+
Symptoms
48+
- </Pagination.Link>
49+
+ </PaginationLink>
50+
</Pagination>
51+
```
52+
3453
## Breaking changes
3554

3655
### Update the JavaScript supported script snippet
3756

38-
You must now use the NHS.UK frontend v10.x feature detection snippet to check for `<script type="module">`. This change enables styling for JavaScript only features in [supported browsers]() only:
57+
You must now use the NHS.UK frontend v10.x feature detection snippet to check for `<script type="module">`. This change enables styling for JavaScript features in [supported browsers]() only:
3958

4059
```patch
4160
- <body class="js-enabled">
42-
+ <body>
61+
+ <body suppressHydrationWarning>
4362
+ <script>document.body.className += ' js-enabled' + ('noModule' in HTMLScriptElement.prototype ? ' nhsuk-frontend-supported' : '');</script>
4463
```
4564

0 commit comments

Comments
 (0)