Skip to content
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

Open
durgaprasadksv opened this issue Oct 27, 2017 · 1 comment

Comments

@durgaprasadksv
Copy link

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.

@ghost
Copy link

ghost commented Nov 5, 2017

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
takaesu-ug added a commit to yusabana-sandbox/js-stack-from-scratch that referenced this issue Feb 13, 2018
takaesu-ug added a commit to yusabana-sandbox/js-stack-from-scratch-practice that referenced this issue Feb 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant