Prop mismatch, server: "null", client: "true" for a value computed by useState(false) #35558
Closed
1 task done
Labels
bug
Issue was opened via the bug report template.
Verify canary release
Provide environment information
What browser are you using? (if relevant)
Firefox 98.0.2; Firefox developer edition 99.0b7
How are you deploying your application? (if relevant)
next dev
Describe the Bug
A page component renders two buttons, which are disabled depending on state of useState. Changing that state, and refreshing the page results in a
Warning: Prop `disabled` did not match. Server: "null" Client: "true"
. Neither button is disabled, but one of them should be.If I only render one button, the error doesn't happen anymore even after changing state and refreshing.
This only seems to happen on firefox, tested in chromium and it doesn't seem to happen.
I found this discussion, but no issue. The discussion seems to tend towards this being a firefox bug, but since it no longer happens once we go from two buttons to one, I figured I should file an issue.
Expected Behavior
There should be no mismatch, there's no difference between the server and client.
To Reproduce
In firefox, click the button to change default state, refresh and it should result in
Warning: Prop `disabled` did not match. Server: "null" Client: "true"
.Comment out the second button, refresh, change default state and refresh again and there's no mismatch anymore.
The text was updated successfully, but these errors were encountered: