You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
you can see that I'm always using watch('fieldName') because i had an issue with declaring them as states (with either watch or useWatch) by declaring them const startDateWatch = watch('StartDate') but this does not work for my unit-tests(RTL) but works in real-life scenario.
My question for you guys, is this a good/bad practice, or does anybody know why it behaves like this in unit tests?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
So i have this component
you can see that I'm always using watch('fieldName') because i had an issue with declaring them as states (with either watch or useWatch) by declaring them const startDateWatch = watch('StartDate') but this does not work for my unit-tests(RTL) but works in real-life scenario.
My question for you guys, is this a good/bad practice, or does anybody know why it behaves like this in unit tests?
Beta Was this translation helpful? Give feedback.
All reactions