Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: TypeError: Cannot read properties of null (reading 'useState') #363

Closed
2 of 4 tasks
mogadanez opened this issue Apr 27, 2024 · 1 comment
Closed
2 of 4 tasks
Labels
bug Something isn't working

Comments

@mogadanez
Copy link

Which packages are impacted?

  • remix-validated-form
  • @remix-validated-form/with-zod
  • @remix-validated-form/with-yup
  • zod-form-data

What version of these packages are you using?

  • remix-validated-form: ^5.1.5
  • @remix-validated-form/with-zod: ^2.0.7

Please provide a link to a minimal reproduction of the issue.

--

Steps to Reproduce the Bug or Issue

If open form via client side - it opens fine, but if refresh page - got error:

TypeError: Cannot read properties of null (reading 'useState')
at useState (/project/node_modules/remix-validated-form/node_modules/react/cjs/react.development.js:1622:21)
at useFormId (/project/node_modules/remix-validated-form/dist/index.cjs.js:1536:50)
at ValidatedForm (/project/node_modules/remix-validated-form/dist/index.cjs.js:1590:18)
at renderWithHooks (/project/node_modules/react-dom/cjs/react-dom-server.node.development.js:9488:16)

Expected behavior

Should refresh nornaly

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Chrome
  • Version: 123

Additional context

No response

@mogadanez mogadanez added the bug Something isn't working label Apr 27, 2024
@mogadanez mogadanez changed the title [Bug]: [Bug]: TypeError: Cannot read properties of null (reading 'useState') Apr 28, 2024
@mogadanez
Copy link
Author

Found Issue myself.

I Switched remix app to canary, and this was cause of error.
Adding resolution to package.json works as fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant