Replies: 5 comments
-
|
Or even more specifically: As per documentation |
Beta Was this translation helpful? Give feedback.
-
|
react-hook-form/src/useWatch.ts Lines 70 to 81 in 51589c5 You can hover over the function definition in VSCode too see the various overloaded definitions.
|
Beta Was this translation helpful? Give feedback.
-
|
@BrendanC23 thank you for explaining. Now I understand the purpose of the overloaded definition and I see it is working correctly in VS Code. Could you explain why it is not working for the IDE? |
Beta Was this translation helpful? Give feedback.
-
|
I'm not sure why you're experiencing different behavior with WebStorm. Can you post your code? Are you able to replicate the error in a CodeSandbox/StackBlitz project? Can you include a screenshot of the exact error message your IDE is giving you? |
Beta Was this translation helpful? Give feedback.
-
|
A dummy example I have created in my JS project: Produces the following warning from IDE side:
And IDE navigates me to the definition of the https://codesandbox.io/p/sandbox/hopeful-fire-qf3lrn Environment: |
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
Should useWatch accept
nameas a string?E.g.
name?: stringreact-hook-form/src/useWatch.ts
Line 43 in 51589c5
Beta Was this translation helpful? Give feedback.
All reactions