-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Flow error in chapter 04. Flow error: (This type is incompatible with the expected param type of Element) #249
Comments
Thanks for pointing this out. It was driving me batty when trying to push my code. |
htbkoo
added a commit
to htbkoo/PomodoroClockRevisitReactRedux_bak
that referenced
this issue
Dec 21, 2017
Pomodoro Clock (with React + Redux)
takaesu-ug
added a commit
to yusabana-sandbox/js-stack-from-scratch
that referenced
this issue
Feb 13, 2018
flow warning workaround: verekia#249
takaesu-ug
added a commit
to yusabana-sandbox/js-stack-from-scratch-practice
that referenced
this issue
Feb 24, 2018
flow warning workaround: verekia/js-stack-from-scratch#249
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: