Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

rphlmr/firefox-remix-react-18-bug

Repository files navigation

When you have a Form (Remix) whith a <button type="submit" disabled={disabled}>, Firefox results in hydratation error Prop 'disabled' did not match. Server: "null" Client: "true".

To solve this issue, just add autoComplete="off" on your Form

Doesn't work with Firefox (103.0.2)

const [isDisabled, setIsDisabled] = useState(false);

// ...

<Form method="post">
  {/* ... */}
  <button type="submit" disabled={isDisabled}>Continue</button>
</Form>

Works with Firefox (103.0.2)

const [isDisabled, setIsDisabled] = useState(false);

// ...

<Form method="post" autoComplete="off">
  {/* ... */}
  <button type="submit" disabled={isDisabled}>Continue</button>
</Form>

Source : vercel/next.js#35558

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published