-
-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: React StrictMode should no longer crash
* fix: react strict mode should no longer crash Fixes #571 * docs: remove old apis from docs * chore: return previous instance instead of generating a new one in React adapter * chore: fix issue with `mount` running twice * test: add test for this edgecase * chore: migrate implementation of useIsomorphicEffectOnce * chore: add name property to useForm * Revert "chore: add name property to useForm" This reverts commit a0b5ea7. * chore: refactor internals to be more React-y * docs: add a minor docs mention in our debugging guide * chore: apply suggestion from fulopkovacs
- Loading branch information
1 parent
b0ab0b4
commit 9602113
Showing
12 changed files
with
252 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
id: debugging | ||
title: Debugging React Usage | ||
--- | ||
|
||
Here's a list of common errors you might see in the console and how to fix them. | ||
|
||
# Changing an uncontrolled input to be controlled | ||
|
||
If you see this error in the console: | ||
|
||
``` | ||
Warning: A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components | ||
``` | ||
|
||
It's likely you forgot the `defaultValues` in your `useForm` Hook or `form.Field` component usage. This is occurring | ||
because the input is being rendered before the form value is initialized and is therefore changing from `undefined` to `""` when a text input is made. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.