We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
...text
I have a use case that I have to pass formState and text from parent to child component:
const Child = ({text, formState}) => { return ( <input {...text('name')} /> ); } const Parent = () => { const [formState, { text }] = useFormState<QueryHistoryFilterFormState>(filters); return ( <Child text={text} formState={formState}/> ); }
However, this will cause warnings since React v16.3.0 because the Child is setting state during render. See more explanations in: https://gorannikolovski.com/blog/cannot-update-a-component-while-rendering-a-different-component-react-native.
Any suggestions or workarounds?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have a use case that I have to pass formState and text from parent to child component:
However, this will cause warnings since React v16.3.0 because the Child is setting state during render. See more explanations in: https://gorannikolovski.com/blog/cannot-update-a-component-while-rendering-a-different-component-react-native.
Any suggestions or workarounds?
The text was updated successfully, but these errors were encountered: