Skip to content

Commit aab7c54

Browse files
remove mentions to experiment react 18 and use only react 19
1 parent 7149242 commit aab7c54

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

docs/guides/streaming-server-rendering.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ React on Rails Pro supports streaming server rendering using React 18's latest A
55
## Prerequisites
66

77
- React on Rails Pro subscription
8-
- React 18 or higher (experimental version)
8+
- React 19
99
- React on Rails v15.0.0-alpha.0 or higher
1010
- React on Rails Pro v4.0.0.rc.5 or higher
1111

@@ -19,14 +19,14 @@ React on Rails Pro supports streaming server rendering using React 18's latest A
1919

2020
## Implementation Steps
2121

22-
1. **Use Experimental React 18 Version**
22+
1. **Use React 19 Version**
2323

24-
First, ensure you're using React 18's experimental version in your package.json:
24+
First, ensure you're using React 19 in your package.json:
2525

2626
```json
2727
"dependencies": {
28-
"react": "18.3.0-canary-670811593-20240322",
29-
"react-dom": "18.3.0-canary-670811593-20240322"
28+
"react": "19.0.0",
29+
"react-dom": "19.0.0"
3030
}
3131
```
3232

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
preset: 'ts-jest/presets/js-with-ts',
55
testEnvironment: 'jsdom',
66
setupFiles: ['<rootDir>/node_package/tests/jest.setup.js'],
7-
// React Server Components tests are not compatible with Experimental React 18 and React 19
7+
// React Server Components tests are compatible with React 19
88
// That only run with node version 18 and above
99
moduleNameMapper:
1010
nodeVersion < 18

node_package/src/RSCClientRoot.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { RailsContext, RenderFunction } from './types';
1010
const { use } = React;
1111

1212
if (typeof use !== 'function') {
13-
throw new Error('React.use is not defined. Please ensure you are using React 18 with experimental features enabled or React 19+ to use server components.');
13+
throw new Error('React.use is not defined. Please ensure you are using React 19 to use server components.');
1414
}
1515

1616
export type RSCClientRootProps = {
@@ -45,7 +45,7 @@ const fetchRSC = ({ componentName, rscPayloadGenerationUrlPath, componentProps }
4545
* 3. Transforms the response stream to replay server-side console logs
4646
* 4. Uses React.use() to handle the async data fetching
4747
*
48-
* @requires React 18+ with experimental features or React 19+
48+
* @requires React 19+
4949
* @requires react-server-dom-webpack/client
5050
*/
5151
const RSCClientRoot: RenderFunction = async ({

node_package/tests/RSCClientRoot.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import RSCClientRoot from '../src/RSCClientRoot';
1616

1717
enableFetchMocks();
1818

19-
// React Server Components tests are not compatible with Experimental React 18 and React 19
19+
// React Server Components tests are compatible with React 19
2020
// That only run with node version 18 and above
2121
(getNodeVersion() >= 18 ? describe : describe.skip)('RSCClientRoot', () => {
2222
let container;

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1772,9 +1772,9 @@
17721772
undici-types "~6.19.2"
17731773

17741774
"@types/prop-types@*":
1775-
version "15.7.3"
1776-
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7"
1777-
integrity sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw==
1775+
version "15.7.14"
1776+
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.14.tgz#1433419d73b2a7ebfc6918dcefd2ec0d5cd698f2"
1777+
integrity sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==
17781778

17791779
"@types/react-dom@^18.3.5":
17801780
version "18.3.5"

0 commit comments

Comments
 (0)