V7: Controller ```value``` type and ```watch``` type is ```never``` when using ```watch``` inside a Field array
See original GitHub issueDescribe the bug
As Shown in the sandbox, I was trying to access a value using the watch method from inside the field components. but the return type is always never.
The Same type occurs in the Controller at the same component when trying to access the value.
Also setting a value with setValue() is not possible due to the never type.
Am I doing something wrong ?
Codesandbox link (Required) https://codesandbox.io/s/bold-meninsky-4ppxs?file=/src/App.tsx
Expected behavior watch method should return the proper type defined the the type definitions, instead returns never.
Screenshots If applicable, add screenshots to help explain your problem.
screenshot from the actual project, somehow the type here is never while in the sandbox the type is any.

Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Argument of type 'string' is not assignable to parameter of type ...
I'm running into this error while trying to set a dynamic name on a Controller. Can you add a code snippet of the...
Read more >useWatch | React Hook Form - Simple React forms validation
Performant, flexible and extensible forms with easy-to-use validation.
Read more >newValue and oldValue parameters are the same when deep ...
Whenever I change the value of any product (i.e. controls. ... I should be able to watch my root array with deep set...
Read more >What's new in ASP.NET Core 7.0 - Microsoft Learn
In ASP.NET Core 7.0, types in DI are checked at app startup with ... Bind query string values to a primitive type array....
Read more >Layouts and binding expressions | Android Developers
For example: instead of List<String> you have to write List<String> . You can also refer to a value in the map using the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thanks, @ymor I think the next release of TS will improve on that (https://github.com/microsoft/TypeScript/pull/43361).
@Gencko94 You need to use something like the following for TS to get the correct type.
`variationValues.${index}.priceEnabled` as `variationValues.0.priceEnabled`I assume this is some form of typescript limitation.