react-hook-form / devtools

📋 DevTools to help debug forms.
https://react-hook-form.com/dev-tools
MIT License
643 stars 47 forks source link

Fix ssr when generate uuid #162

Closed jsun969 closed 2 years ago

jsun969 commented 2 years ago

resolve #161

jsun969 commented 2 years ago

I modified code to this. Vite example runs properly. https://github.com/react-hook-form/devtools/pull/160#issuecomment-1183767644

But nextjs have an error, I don't know how to fix it...

image

We can replace the vite /example by /nextjs-example after we fix this.

jsun969 commented 2 years ago

But ye... We can merge it first and create 4.2.2-beta.1. The error only occured in example. But the main code works fine.

bluebill1049 commented 2 years ago

instead of using nextJS maybe we can use vite with SSR, keep this repo simple, in fact, if this mismatch is resolved we probably don't have to worry about it too much by introducing SSR in this repo.

jsun969 commented 2 years ago

I see

bluebill1049 commented 2 years ago

thanks for the fix 🙏

jsun969 commented 2 years ago

kk. Could you create 4.2.2-beta.1 for #159 ?

bluebill1049 commented 2 years ago

the fix looks good have published the patch