GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add ReactDOMClient to ServerIntegration(Hooks|NewContext) by rickhanlonii · Pull Request #28135 · react/react

Conversation

@rickhanlonii

@rickhanlonii rickhanlonii commented Jan 28, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Overview

Branched off #28130

Failing Fixed by @eps1lon

Most of the tests pass, but there are 3 tests that have additional warnings due to client render error retries.

For example, before we would log:

Warning: Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks.
Warning: Expected server HTML to contain a matching text node for "0" in <div>.

And now we log

Warning: Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks.
Warning: Expected server HTML to contain a matching text node for "0" in <div>.
Warning: Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks.

We can't just update the expected error count for these tests, because the additional error only happens on the client. So I need some guidance on how to fix these.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Jan 28, 2024
@rickhanlonii
rickhanlonii force-pushed the rh/server-test-utils-hooks branch from b30c04a to d1eb303 Compare January 28, 2024 00:20
@rickhanlonii rickhanlonii changed the title [Failing] Add ReactDOMClient to ServerIntegrationHooks [Failing] Add ReactDOMClient to ServerIntegration(Hooks|NewContext) Jan 28, 2024
@react-sizebot

react-sizebot commented Jan 28, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Comparing: 9aef5d2...1365876

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 176.59 kB 176.59 kB = 55.01 kB 55.01 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 178.69 kB 178.69 kB = 55.64 kB 55.64 kB
facebook-www/ReactDOM-prod.classic.js = 573.52 kB 573.52 kB = 100.99 kB 100.99 kB
facebook-www/ReactDOM-prod.modern.js = 557.29 kB 557.29 kB = 98.07 kB 98.07 kB
test_utils/ReactAllWarnings.js Deleted 67.55 kB 0.00 kB Deleted 16.54 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
test_utils/ReactAllWarnings.js Deleted 67.55 kB 0.00 kB Deleted 16.54 kB 0.00 kB

Generated by 🚫 dangerJS against 1365876

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

eps1lon
eps1lon reviewed Jan 28, 2024
View reviewed changes
Comment thread packages/react-dom/src/__tests__/ReactDOMServerIntegrationHooks-test.js
const domNode = await render(<App />, 1);
const domNode = await render(
<App />,
render === clientRenderOnBadMarkup

@eps1lon eps1lon Jan 28, 2024

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use this pattern in other tests as well. E.g. packages/react-dom/src/__tests__/ReactDOMServerIntegrationElements-test.js makes extensive usage of assertions based on the renderer.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@rickhanlonii rickhanlonii Jan 28, 2024

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh snap nice

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@eps1lon
eps1lon force-pushed the rh/server-test-utils-hooks branch 2 times, most recently from 110637a to d0fada2 Compare January 28, 2024 10:21
eps1lon
eps1lon approved these changes Jan 28, 2024
View reviewed changes
@rickhanlonii
rickhanlonii marked this pull request as ready for review January 28, 2024 21:08
@rickhanlonii rickhanlonii changed the title [Failing] Add ReactDOMClient to ServerIntegration(Hooks|NewContext) Add ReactDOMClient to ServerIntegration(Hooks|NewContext) Jan 28, 2024
@rickhanlonii
Add ReactDOMClient to ServerIntegrationTestUtils
e204d76
@rickhanlonii
rickhanlonii force-pushed the rh/server-test-utils branch from 233b65d to e204d76 Compare February 1, 2024 20:53
rickhanlonii and others added 2 commits February 1, 2024 16:05
@rickhanlonii
Add ReactDOMClient to ServerIntegrationHooks
b200a8b
Sebastian Silbermann @rickhanlonii
Handle different error counts depending on renderer
1365876
@rickhanlonii
rickhanlonii force-pushed the rh/server-test-utils-hooks branch from d0fada2 to 1365876 Compare February 1, 2024 21:06
Base automatically changed from rh/server-test-utils to main February 1, 2024 23:27
@rickhanlonii
rickhanlonii merged commit fa6674b into main Feb 1, 2024
@rickhanlonii
rickhanlonii deleted the rh/server-test-utils-hooks branch February 1, 2024 23:32
gaearon pushed a commit that referenced this pull request Feb 3, 2024
@rickhanlonii Sebastian Silbermann @gaearon
Add ReactDOMClient to ServerIntegration(Hooks|NewContext) (#28135)
a008537
## Overview

Branched off #28130

### ~Failing~ Fixed by @eps1lon 
Most of the tests pass, but there are 3 tests that have additional
warnings due to client render error retries.

For example, before we would log:

```
Warning: Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks.
Warning: Expected server HTML to contain a matching text node for "0" in <div>.
```

And now we log

```
Warning: Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks.
Warning: Expected server HTML to contain a matching text node for "0" in <div>.
Warning: Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks.
```

We can't just update the expected error count for these tests, because
the additional error only happens on the client. So I need some guidance
on how to fix these.

---------

Co-authored-by: Sebastian Silbermann <[email protected]>
@gnoff gnoff mentioned this pull request Feb 5, 2024
Update React from 60a927d04 to 2bc7d336a vercel/next.js#61522
Merged
gnoff added a commit to gnoff/next.js that referenced this pull request Feb 6, 2024
@gnoff
updated React from 60a927d04 to 2bc7d336a.
6290768
- react/react#28250
- react/react#28225
- react/react#28123
- react/react#28240
- react/react#28239
- react/react#28245
- react/react#28244
- react/react#28238
- react/react#28235
- react/react#28221
- react/react#28215
- react/react#28214
- react/react#28213
- react/react#28212
- react/react#28211
- react/react#28247
- react/react#28210
- react/react#28186
- react/react#28232
- react/react#28169
- react/react#28177
- react/react#28170
- react/react#28168
- react/react#28122
- react/react#27982
- react/react#28217
- react/react#28223
- react/react#28208
- react/react#28209
- react/react#28200
- react/react#28199
- react/react#28198
- react/react#28197
- react/react#28196
- react/react#28194
- react/react#28192
- react/react#28191
- react/react#28182
- react/react#28181
- react/react#28180
- react/react#28178
- react/react#28201
- react/react#28176
- react/react#28162
- react/react#28131
- react/react#28190
- react/react#28172
- react/react#28171
- react/react#28173
- react/react#28174
- react/react#28175
- react/react#28136
- react/react#28135
- react/react#28134
- react/react#28133
- react/react#28132
- react/react#28130
- react/react#28202
- react/react#28102
- react/react#28161
- react/react#28193
- react/react#28195
- react/react#28189
- react/react#28160
- react/react#28096
- react/react#28183
- react/react#28125
- react/react#28157
- react/react#28115
- react/react#28124
- react/react#28163
- react/react#28164
- react/react#28150
- react/react#28159
- react/react#28069
- react/react#28110
- react/react#28148
- react/react#28116
- react/react#28099
- react/react#28100
- react/react#28147
- react/react#28128
- react/react#28126
- react/react#28139
- react/react#28140
- react/react#28141
- react/react#28142
- react/react#28113
- react/react#28129
- react/react#28114
- react/react#28053
- react/react#28091
- react/react#28087
- react/react#28112
- react/react#28086
- react/react#28101
- react/react#28106
- react/react#28117
- react/react#28118
- react/react#28105
- react/react#27883
- react/react#28111
- react/react#28095
- react/react#28108
- react/react#28090
- react/react#28089
- react/react#28076
- react/react#28074
- react/react#28103
- react/react#28098
- react/react#28097
- react/react#28068
- react/react#28093
- react/react#28094
- react/react#28073
- react/react#28084
- react/react#28063
- react/react#28085
- react/react#28083
- react/react#28065
- react/react#28061
- react/react#28077
- react/react#28075
- react/react#28078
- react/react#28050
- react/react#28011
- react/react#28055
- react/react#28066
- react/react#28067
- react/react#28010
- react/react#27993
- react/react#28052
- react/react#28060
- react/react#28059
- react/react#28034
- react/react#28033
- react/react#28004
- react/react#28051
- react/react#28012
- react/react#28001
- react/react#28002
- react/react#27995
- react/react#28006
- react/react#28005
- react/react#28007
- react/react#28008
- react/react#28009
- react/react#28000
- react/react#28003
- react/react#27997
- react/react#27240
- react/react#27977
- react/react#27940
- react/react#27939
- react/react#28090
- react/react#28089
- react/react#28076
- react/react#28074
- react/react#28103
- react/react#28098
- react/react#28097
- react/react#28068
- react/react#28093
- react/react#28094
- react/react#28073
- react/react#28084
- react/react#28063
- react/react#28085
- react/react#28083
- react/react#28065
- react/react#28061
- react/react#28077
- react/react#28075
- react/react#28078
- react/react#28050
- react/react#28011
- react/react#28055
- react/react#28066
- react/react#28067
- react/react#28010
- react/react#27993
- react/react#28052
- react/react#28060
- react/react#28059
- react/react#28034
- react/react#28033
- react/react#28004
- react/react#28051
- react/react#28012
- react/react#28001
- react/react#28002
- react/react#27995
- react/react#28006
- react/react#28005
- react/react#28007
- react/react#28008
- react/react#28009
- react/react#28000
- react/react#28003
- react/react#27997
- react/react#27240
- react/react#27977
- react/react#27940
- react/react#27939
gnoff added a commit to vercel/next.js that referenced this pull request Feb 6, 2024
@gnoff
Update React from 60a927d04 to 2bc7d336a (#61522)
2395557
Updates React from 60a927d04 to 2bc7d336a

Also updates aliases for `react.shared-subset` to `react.react-server`

### React upstream changes

- react/react#28250
- react/react#28225
- react/react#28123
- react/react#28240
- react/react#28239
- react/react#28245
- react/react#28244
- react/react#28238
- react/react#28235
- react/react#28221
- react/react#28215
- react/react#28214
- react/react#28213
- react/react#28212
- react/react#28211
- react/react#28247
- react/react#28210
- react/react#28186
- react/react#28232
- react/react#28169
- react/react#28177
- react/react#28170
- react/react#28168
- react/react#28122
- react/react#27982
- react/react#28217
- react/react#28223
- react/react#28208
- react/react#28209
- react/react#28200
- react/react#28199
- react/react#28198
- react/react#28197
- react/react#28196
- react/react#28194
- react/react#28192
- react/react#28191
- react/react#28182
- react/react#28181
- react/react#28180
- react/react#28178
- react/react#28201
- react/react#28176
- react/react#28162
- react/react#28131
- react/react#28190
- react/react#28172
- react/react#28171
- react/react#28173
- react/react#28174
- react/react#28175
- react/react#28136
- react/react#28135
- react/react#28134
- react/react#28133
- react/react#28132
- react/react#28130
- react/react#28202
- react/react#28102
- react/react#28161
- react/react#28193
- react/react#28195
- react/react#28189
- react/react#28160
- react/react#28096
- react/react#28183
- react/react#28125
- react/react#28157
- react/react#28115
- react/react#28124
- react/react#28163
- react/react#28164
- react/react#28150
- react/react#28159
- react/react#28069
- react/react#28110
- react/react#28148
- react/react#28116
- react/react#28099
- react/react#28100
- react/react#28147
- react/react#28128
- react/react#28126
- react/react#28139
- react/react#28140
- react/react#28141
- react/react#28142
- react/react#28113
- react/react#28129
- react/react#28114
- react/react#28053
- react/react#28091
- react/react#28087
- react/react#28112
- react/react#28086
- react/react#28101
- react/react#28106
- react/react#28117
- react/react#28118
- react/react#28105
- react/react#27883
- react/react#28111
- react/react#28095
- react/react#28108
- react/react#28090
- react/react#28089
- react/react#28076
- react/react#28074
- react/react#28103
- react/react#28098
- react/react#28097
- react/react#28068
- react/react#28093
- react/react#28094
- react/react#28073
- react/react#28084
- react/react#28063
- react/react#28085
- react/react#28083
- react/react#28065
- react/react#28061
- react/react#28077
- react/react#28075
- react/react#28078
- react/react#28050
- react/react#28011
- react/react#28055
- react/react#28066
- react/react#28067
- react/react#28010
- react/react#27993
- react/react#28052
- react/react#28060
- react/react#28059
- react/react#28034
- react/react#28033
- react/react#28004
- react/react#28051
- react/react#28012
- react/react#28001
- react/react#28002
- react/react#27995
- react/react#28006
- react/react#28005
- react/react#28007
- react/react#28008
- react/react#28009
- react/react#28000
- react/react#28003
- react/react#27997
- react/react#27240
- react/react#27977
- react/react#27940
- react/react#27939
- react/react#28090
- react/react#28089
- react/react#28076
- react/react#28074
- react/react#28103
- react/react#28098
- react/react#28097
- react/react#28068
- react/react#28093
- react/react#28094
- react/react#28073
- react/react#28084
- react/react#28063
- react/react#28085
- react/react#28083
- react/react#28065
- react/react#28061
- react/react#28077
- react/react#28075
- react/react#28078
- react/react#28050
- react/react#28011
- react/react#28055
- react/react#28066
- react/react#28067
- react/react#28010
- react/react#27993
- react/react#28052
- react/react#28060
- react/react#28059
- react/react#28034
- react/react#28033
- react/react#28004
- react/react#28051
- react/react#28012
- react/react#28001
- react/react#28002
- react/react#27995
- react/react#28006
- react/react#28005
- react/react#28007
- react/react#28008
- react/react#28009
- react/react#28000
- react/react#28003
- react/react#27997
- react/react#27240
- react/react#27977
- react/react#27940
- react/react#27939

Closes NEXT-2331
@ztanner ztanner mentioned this pull request Mar 19, 2024
(backport) Update React from 60a927d04 to 14898b6a9 vercel/next.js#63442
Closed
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
@rickhanlonii Sebastian Silbermann @AndyPengc12
Add ReactDOMClient to ServerIntegration(Hooks|NewContext) (react#28135)
2ba47ff
## Overview

Branched off react#28130

### ~Failing~ Fixed by @eps1lon 
Most of the tests pass, but there are 3 tests that have additional
warnings due to client render error retries.

For example, before we would log:

```
Warning: Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks.
Warning: Expected server HTML to contain a matching text node for "0" in <div>.
```

And now we log

```
Warning: Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks.
Warning: Expected server HTML to contain a matching text node for "0" in <div>.
Warning: Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks.
```

We can't just update the expected error count for these tests, because
the additional error only happens on the client. So I need some guidance
on how to fix these.

---------

Co-authored-by: Sebastian Silbermann <[email protected]>
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
@rickhanlonii
Add ReactDOMClient to ServerIntegration(Hooks|NewContext) (#28135)
bdb7f33
## Overview

Branched off #28130

### ~Failing~ Fixed by @eps1lon
Most of the tests pass, but there are 3 tests that have additional
warnings due to client render error retries.

For example, before we would log:

```
Warning: Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks.
Warning: Expected server HTML to contain a matching text node for "0" in <div>.
```

And now we log

```
Warning: Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks.
Warning: Expected server HTML to contain a matching text node for "0" in <div>.
Warning: Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks.
```

We can't just update the expected error count for these tests, because
the additional error only happens on the client. So I need some guidance
on how to fix these.

---------

Co-authored-by: Sebastian Silbermann <[email protected]>

DiffTrain build for commit fa6674b.
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
@rickhanlonii Sebastian Silbermann
Add ReactDOMClient to ServerIntegration(Hooks|NewContext) (react#28135)
e249b76
## Overview

Branched off react#28130

### ~Failing~ Fixed by @eps1lon 
Most of the tests pass, but there are 3 tests that have additional
warnings due to client render error retries.

For example, before we would log:

```
Warning: Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks.
Warning: Expected server HTML to contain a matching text node for "0" in <div>.
```

And now we log

```
Warning: Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks.
Warning: Expected server HTML to contain a matching text node for "0" in <div>.
Warning: Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks.
```

We can't just update the expected error count for these tests, because
the additional error only happens on the client. So I need some guidance
on how to fix these.

---------

Co-authored-by: Sebastian Silbermann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@eps1lon eps1lon eps1lon approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@rickhanlonii @react-sizebot @eps1lon @facebook-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.