Closed PirateNick closed 6 years ago
Please verify that you indeed have React 16+ installed. That error above is related to returning an array and pertains to React 15 <
I read that too somewhere, so I upgraded my react version in the package.json file. I also deleted the dist folder and rebuild the project.
Unfortunately, this was not enough. I just quickly deleted the node modules folder and manually installed all the packages through cmd (npm install). Now I get a bunch of type (typescript) errors, but I think my react was indeed not fully upgraded, and now it is.
I don't have time to look into this further right now, but I'm 90% sure this will fix it. So if anyone else is still having this problem, delete node modules folder and reinstall, because apparently, Visual Studio doesn't do a great job in automatically upgrading react when the package.json file is changed.
Thanks for the help!
When adding the timeline to my ASP .net core 2 project, I get the following error:
Consumer.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.
I'm using typescript, and these versions:
I copy pasted the exampel code from the docs:
with in the render function:
Any idea?