Material-UI SSR 标记与客户端不匹配

Material-UI SSR markup doesn't match client

我正在使用带有服务器端渲染的 React 16 的 MaterialUI。一切似乎都在工作,但 React 抱怨服务器端和客户端标记不匹配。我做错了什么?

反应警告:Warning: Prop 'htmlFor' did not match. Server: "undefined-undefined-CurrentValue-9124" Client: "undefined-undefined-CurrentValue-51839"

        <TextField
          className="mr-3"
          disabled={true}
          floatingLabelText="Current Value"
          value={props.inputValue}
        />

事实证明,这是一个错误,一旦 MUI 1.0 发布,它就不会再存在了。将 id 属性添加到输入字段会使警告暂时消失。

详情在这里:https://github.com/callemall/material-ui/issues/9033#issuecomment-342569426