Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialBrunhilde Vink
9,102 PointsIcon(...): Nothing was returned from render. This usually means a return statement is missing.
I followed the exact same steps but it keeps giving me the above error.
1 Answer
Torben Korb
Front End Web Development Techdegree Graduate 91,433 PointsHi Brunhilde,
try to wrap your return from the Icon component in parentheses instead of curly braces or you'll return a block of code that returns nothing instead of the SVG code.
const Icon = props => (
<svg>...
...
</svg>
);
Alternatively you can return the SVG code from inside the code block:
const Icon = props => {
return (
<svg...
...
</svg>);
};
Hope this helps you, happy coding!
Erika Suzuki
20,299 PointsYeah, i think it was a typo. Guil Hernandez
Alejandro Jiménez-Flores
Full Stack JavaScript Techdegree Student 14,981 PointsHad the same error and this fixed! Thanks!!
Brunhilde Vink
9,102 PointsBrunhilde Vink
9,102 Points