Reputation: 2344
I'm using MaterialUI w/ React 16 w/ server-side rendering. Everything seems to be wroking, but React is complaining about the server-side and client-side markups not matching. What am I doing wrong?
React Warning: 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}
/>
Upvotes: 1
Views: 1185
Reputation: 2344
Turns out it's a bug that won't be there much longer once MUI 1.0 is released. Adding an id
attribute to input fields makes the warning go away for now.
Details here: https://github.com/callemall/material-ui/issues/9033#issuecomment-342569426
Upvotes: 1