【问题标题】:Unhandled Runtime Error : Error : Hydration failed because the initial UI does not match what was rendered on the server未处理的运行时错误:错误:水化失败,因为初始 UI 与服务器上呈现的内容不匹配
【发布时间】:2022-10-09 02:17:19
【问题描述】:

错误:水化失败,因为初始 UI 与服务器上呈现的内容不匹配。

Call Stack
throwOnHydrationMismatch
node_modules\react-dom\cjs\react-dom.development.js (14344:0)
tryToClaimNextHydratableInstance
node_modules\react-dom\cjs\react-dom.development.js (14372:0)
updateHostComponent$1
node_modules\react-dom\cjs\react-dom.development.js (20636:0)
beginWork
node_modules\react-dom\cjs\react-dom.development.js (22373:0)
HTMLUnknownElement.callCallback
node_modules\react-dom\cjs\react-dom.development.js (4157:0)

【问题讨论】:

    标签: javascript node.js reactjs


    【解决方案1】:

    您可以提供您的登陆代码以了解问题。因为when I first render my application doesn't have an access window.ethereum and it tries to render it. By that time it actually does render it the components and has mounted and does have access to the changed value. windows.ethereum value is now changed and shows up Hydration error.,我有同样的问题

    它通常在 nextJS 应用程序中执行。

    【讨论】:

      猜你喜欢
      • 2022-09-23
      • 2023-01-30
      • 2023-01-30
      • 2022-08-20
      • 2023-01-10
      • 2023-02-04
      • 2022-10-24
      • 2023-02-19
      • 2022-07-23
      相关资源
      最近更新 更多