vazco / uniforms

A React library for building forms from any schema.
https://uniforms.tools
MIT License
1.94k stars 239 forks source link

Basic example is not working #1209

Closed DGolubets closed 1 year ago

DGolubets commented 1 year ago

I just followed "Basic uniforms usage". No fields are displayed.

When I add <AutoFields /> I see the text fields, but I cannot modify their values...

 "ajv": "^8.12.0",
  "react": "^18.2.0",
  "react-dom": "^18.2.0",
  "react-scripts": "5.0.1",
  "typescript": "^4.9.4",
  "uniforms": "^4.0.0-alpha.0",
  "uniforms-bridge-json-schema": "^4.0.0-alpha.0",
  "uniforms-unstyled": "^4.0.0-alpha.0",
  "web-vitals": "^2.1.4"
radekmie commented 1 year ago

Hi @DGolubets! Could you post the whole code and an error (if there's any)? Right now it's really hard to tell what's the problem here. Ideally, reproduce it using our Codesandbox template.

radekmie commented 1 year ago

I'm closing due to inactivity. Feel free to comment, though.

snikch commented 1 year ago

I have come across this issue too. It appears to be related to React 18.

This reproduction is based on the template and simply updates React and React DOM to 18.2.0, and replaces the index.tsx with the new React Root.

https://codesandbox.io/s/recursing-mclean-7i1bbc

Removed <React.StrictMode> fixes the issue.

radekmie commented 1 year ago

@snikch Compatibility with StrictMode is tracked in #1194.