You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flow error: (This type is incompatible with the expected param type of Element)
ReactDOM.render(, document.querySelector(APP_CONTAINER_SELECTOR));
But if I add the following code.
const rootEl = document.querySelector(APP_CONTAINER_SELECTOR);
if (!(rootEl instanceof Element)) {
throw new Error('invalid type');
}
ReactDOM.render(, rootEl);
the Flow errors are gone.
The text was updated successfully, but these errors were encountered:
Type of issue: Bug
Chapter: 04
If it's a bug: Yes
Flow error: (This type is incompatible with the expected param type of Element)
ReactDOM.render(, document.querySelector(APP_CONTAINER_SELECTOR));
But if I add the following code.
const rootEl = document.querySelector(APP_CONTAINER_SELECTOR);
if (!(rootEl instanceof Element)) {
throw new Error('invalid type');
}
ReactDOM.render(, rootEl);
the Flow errors are gone.
The text was updated successfully, but these errors were encountered: