Replies: 1 comment 2 replies
-
Could you share how the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've got a simple form that uses a useState hook to set initial values:
const [fields, setFields] = useState({ firstName: "", lastName: "", email: "", gender: "", date: "", city: "", phone: "", value: "", });
The form uses a couple of sub-components where the above fields are passed as props:
<FirstStep values={fields} /> );
The form runs fine on the dev side, but when running npm run build, it throws the above error. I guess the useState values are being ignored by NextJS on the build, but wonder why and how to work around that? Any ideas anyone?
Beta Was this translation helpful? Give feedback.
All reactions