[TextField] defaultProps seems to be ignored when React.hydrate is used in SSR setup with Remix #30922
Labels
bug 🐛
Something doesn't work
component: text field
This is the name of the generic UI component, not the React module!
Duplicates
Latest version
Current behavior 😯
I used Remix + MUI example as my base and the only change I did is in the
theme
part, like this:In my app I then have login form which uses
TextField
component. When I disable javascript, the form looks correct, the labels are shrunk by default. When I enable javascript and reload the page, the labels are shrunk but when I focus & blur the field(s), it seems that they use the default behavior.Also there is the following warning in the console:
Expected behavior 🤔
I would expect that
defaultProps
are correctly hydrated in SSR setup.Steps to reproduce 🕹
Steps:
theme
to have the changes from "Current behavior" section, add a login form to theindex
routenpm run dev
, load the page and check the consoleContext 🔦
https://github.com/mui-org/material-ui/tree/master/examples/remix-with-typescript
Your environment 🌎
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: