Tell us what’s happening:
It works in the challenge, but not outside of the fcc coding environment. I see this error in my browser:
Warning: Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it
What other things do I need to do to make this work outside of fcc? I think it is very important to be able to do the challenges away from the fcc coding environment.
Your code so far
1 import React from 'react';
2 import ReactDOM from 'react-dom';
3
4
5 const MyComponent = function() {
6 return(
7 <div>My Component</div>
8 );
9 }
10
11 ReactDOM.render(MyComponent, document.getElementById("root"));
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
.
Link to the challenge: