Bug: React 18 is not able to suppressHydrationWarning

This issue has been created since 2022-11-03.

React version: 18.2.0

Steps To Reproduce

  1. clone https://github.com/justin-calleja/suppress-hydration-warning
  2. cd to both shw-17 and shw-18 directories and install with: yarn
  3. Run yarn dev to run both nextjs servers on different ports.
  4. Go to the one running React 17 - you should not get the hydration warning.
  5. Go to the one running React 18 - you should get the hydration warning.

Link to code example: https://github.com/justin-calleja/suppress-hydration-warning

Was using Node v18.10.0 when I made the example.

The current behavior

Using React 18, I cannot avoid getting the hydration warning when running my app with the nextjs dev server.

The expected behavior

Just like using React 17, I would like to use React 18 and suppress this warning when building an SPA only page with nextjs using nextjs just for it's build setup and maybe api features (node server).

Thank you

More Details About Repo
Owner Name facebook
Repo Name react
Full Name facebook/react
Language JavaScript
Created Date 2013-05-24
Updated Date 2022-12-10
Star Count 198882
Watcher Count 6638
Fork Count 41302
Issue Count 1120

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
Compatibility with PyTorch when the distributed package is not available 2 2022-08-26 2022-08-25
Is there a video talk or survey about NAT in 2021 or 2022? 1 2022-02-16 2022-05-08
`type_traits::has_value_v` is not sufficiently restrictive 3 2022-04-08 2022-11-18
[BUG] HO doesn't display jersey numbers greater than 49 0 2022-03-19 2022-10-30
Unexpected int instead of string returned by get_dynamic_path(part, mask, metadata) 3 2021-01-30 2022-09-28
Вызов делегата-процедуры в корне лямбды не работает, если передавать лямбду в Dispatcher.Invoke 11 2021-10-17 2022-12-03
Search_limb will return duplicated limbs 0 2022-02-26 2022-09-11
GetAbbreviationsForTimeZone returns non abbreviation names. 5 2018-08-02 2022-01-15
Sending audio message issue 3 2021-02-04 2022-11-19
sly-mrepl--syntax-propertize misbehaving 26 2021-06-03 2022-12-03
[Tools] Prepare testing plan for testing complex HTML with Handsontable 0 2020-06-30 2022-11-26
How to pass additional arguments to electron-builder? 1 2021-11-17 2022-11-11
问题: 怎么在init 部署的时候指定 etcd 安装的位置 2 2021-11-16 2022-11-17
Check for updates cached 2 2022-03-18 2022-10-05
Loupedeck live issues 0 2022-09-20 2022-11-12
kami mini model YYS.2919 ( 1 2021-05-11 2022-11-30
Move const array of `dtypes` to `dtypes.ts` 0 2021-06-29 2022-12-05
sqlite driver starves CPU 1 2021-09-19 2022-12-01
inline font icon bug 0 2022-11-04 2022-11-05
"good move" animation unselecting piece in interactive study 0 2021-10-30 2022-11-18
PSA_ALG_RSA_PKCS1V15_SIGN_RAW can be only used with the psa_sign_hash() and psa_verify_hash() functions. 3 2021-07-29 2022-09-25
Go语言核心知识 | 许少年的博客 0 2021-06-08 2021-12-15
Can't really add line numbers because of how empty lines are treated. 0 2021-07-07 2022-10-29
ddb activate error with permissions specs containing slash 0 2021-01-12 2022-07-23
Interpolation broken by change in 3.13.1 5 2022-01-22 2022-12-03
add custom fields/attribute to issues 1 2022-01-08 2022-09-17
candidateRegions.bed file is empty after use the example code 1 2021-06-27 2022-12-03
531 - String to Union 0 2021-12-30 2022-08-11
[Rust] Implement APIs for Memory 1 2021-12-06 2022-12-07
Add mark "failed" e2e 1 2022-02-11 2022-11-06
Visual editor is disabled because: you are using an unsupported directive: @index 2 2022-09-07 2022-12-03
Verbosity option is not working in GridSearchCV (Jupyter notebook) 15 2022-03-15 2022-12-09
[Feature Request]: Adding hover implementation to graph_objs.Indicator 0 2021-12-29 2022-09-03
💡 RFC: Support a default layout 17 2021-06-11 2022-12-05
Godot 3.4.1 HTTP Request too long? (Android) 2 2021-12-18 2022-11-27
Feedback for /docs/getting-started/connection-approval.md 0 2021-10-23 2022-10-04
Serialize addon doesn't correctly restore the cursor's foreground color 1 2022-03-11 2022-09-12
addr2line: /tmp/jeprof.out.9.0.i0.heap: File format not recognized 0 2022-10-08 2022-12-02
Heap profile dump showing zeroes. 1 2022-09-23 2022-12-02
GCP Autopilot support 6 2021-07-30 2022-11-30
Make not working 1 2019-11-01 2022-01-01
Java formatter setting ignored - even with google's format 3 2022-06-17 2022-09-11
windosws使用ppccrv3推理,出现bug,推理时间累加 3 2022-09-07 2022-10-16
How does MMDNN implement the "retrain" part? 1 2020-10-06 2022-11-19
Analyzer Feedback from IntelliJ 0 2022-01-28 2022-09-26
Don't print messages about custom nodes templates if they are not set 1 2021-08-31 2022-12-01
Activating production account 11 2022-03-22 2022-11-18
Server crashing - how to debug / set logging level 4 2021-12-22 2022-11-21
tf.concat and tf.stack throw a "Failed to compile fragment shader" error, for arrays of specific lengths 1 2022-11-03 2022-11-19
Add `unstable` warnings 0 2021-07-08 2022-10-13