https://codesandbox.io/embed/j30o67kpxy
React shows warning in console if I use React.Fragment
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.
Yeah, this is a false positive warning. It only appears if you use a Symbol polyfill.
I think it happens because we validate types here:
React.Fragment is a symbol. However, if Symbol is polyfilled, then its typeof won't be 'symbol'鈥攊t will be just 'object'. So this condition won't be true.
To get around this, I think we should compare type directly to React.Fragment before concluding it's invalid.
I would like to work on it, if it is possible :)
Sure, it's yours.
@AyWa We didn't get a PR, so the submitter has fixed the issue.
@gaearon Yeah I saw yesterday that the PR was already made. Sadly I planed to work on it this week.
Anyway I hope I can find a good first issue soon ;)
Glad this is fixed. Any way this can make it into a release soon?
We'll likely cut a release in a week or so.
In the meantime if this is blocking you, you can yarn build -- dom from master and grab the builds from build/dist.
@dereklieu You can use https://www.npmjs.com/package/@xavescor/react package while new version is not released.
@gaearon Any update on when we are expecting this fix to land on npm?
@danwad C'mon build own react package until 16.3 release. It's several lines in your webpack config.
We plan a release within a week or so.
Most helpful comment
We'll likely cut a release in a week or so.