-
Notifications
You must be signed in to change notification settings - Fork 3
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
React DOMException when setting undefined #1036
Comments
Hi @chester23491 please use the state in the text like that
because otherwise you are pushing an undefined to a child directly. |
Hey @hirsch88, thank you for the quick response. Did you try it out? I'm getting still this error. The error exist in all react components. Also when we set string empty I'm are getting this error. |
Hi @hirsch88 Thank you for your time. I tried to reproduce the issue in the ionic-framework react test app (https://github.com/ionic-team/ionic-framework/tree/main/packages/react/test-app). Setting the components empty or undefined is working fine. I was not able to reproduce it there. const Main: React.FC<MainProps> = () => {
const [foo, setFoo] = React.useState<string | undefined>('foo');
return (
<IonPage>
<IonText>{foo}</IonText>
<IonButton onClick={() => setFoo(undefined)}>Set Undefined</IonButton>
<IonButton onClick={() => setFoo('')}>Set Empty</IonButton>
<IonButton onClick={() => setFoo('Bar')}>Set Bar</IonButton>
<IonButton onClick={() => setFoo(' ')}>Set Whitespace</IonButton>
</IonPage>
);
}; Can you please update as discussed the Regards, |
…on-when-setting-undefined fix(react): handle empty nodes. Closes #1036
Uncaught DOMException in React
We are getting a Uncaught DOMException in React, when we are setting
undefined
in the Baloise components at runtime.Message:
Detailed description
Steps to reproduce the issue
Additional information
The text was updated successfully, but these errors were encountered: