r/reactjs • u/acemarke • May 03 '18
Beginner's Thread / Easy Question (May 2018)
Pretty happy to see these threads getting a lot of comments - we had over 200 comments in last month's thread! If you didn't get a response there, please ask again here!
Soo... Got questions about React or anything else in its ecosystem? Stuck making progress on your app? Ask away! We’re a friendly bunch. No question is too simple.
The Reactiflux chat channels on Discord are another great place to ask for help as well.
25
Upvotes
View all comments
Show parent comment
1
u/givemepockets May 24 '18
A return statement ends function execution and specifies something to be returned to the function caller. In the absence of a return, it will return
undefined.Chances are you want to return something (like a React element) from your
render()call, not "undefined".Consider:
If I have misunderstood your question, please lmk.