Skip to content

Commit b4606b4

Browse files
Edweisbluebill1049
andauthored
Update advanced-usage.mdx wrong link reference (#1027)
"Transform and Parse" did not point to the right place Co-authored-by: Beier (Bill) <[email protected]>
1 parent a79f025 commit b4606b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/advanced-usage.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ it("should not display error when value is valid", async () => {
805805
})
806806
```
807807
808-
#### Resolving act warning during test {#TransformandParse}
808+
#### Resolving act warning during test
809809
810810
If you test a component that uses react-hook-form, you might run into a warning like this, even if you didn't write any asynchronous code for that component:
811811
@@ -870,7 +870,7 @@ it("should have a submit button", async () => {
870870
871871
---
872872
873-
## Transform and Parse {#Howtosharerefusage}
873+
## Transform and Parse {#TransformandParse}
874874
875875
The native input returns the value in `string` format unless invoked with `valueAsNumber` or `valueAsDate`, you can read more under [this section](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement). However, it's not perfect. We still have to deal with `isNaN` or `null` values. So it's better to leave the transform at the custom hook level. In the following example, we are using the `Controller` to include the functionality of the transform value's input and output. You can also achieve a similar result with a custom `register`.
876876

0 commit comments

Comments
 (0)