-
I tried Press the "Set Data" button. All states should update to the hard coded object. However, if the page refresh button is pressed, all yup state is set to Screencast.from.24-01-25.10.58.07.webm |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I see, from looking at the Yup const [yupValidateSync, setYupValidateSync] = useQueryState(
'yupValidateSync',
parseAsJson(yupSchema.validateSync.bind(yupSchema))
) Note that |
Beta Was this translation helpful? Give feedback.
I see, from looking at the Yup
validateSync
code, it needs binding to the schema instance to keep thethis
reference:Note that
yupSchema.validate
will not work as it returns a Promise (and nuqs parsers are synchronous).