This is a response/answer to a recently closed post


#1

This is a response/answer to a recently closed post

Hey @nature88 are you still working through React.js Part 1 ?

Following the tutorial in the link you shared, the part that is JSX is the code that looks like HTML
Like so
<li key={"person_" + i}>{person}</li> and <ul>{peopleLis}</ul>

However in the code you shared, we have the map method on a string with an output that is resulting in errors because you used an ES6 feature called template strings, as shown in the second blockquote.

Therefore there is no JSX in there and it shall be interpreted as a string

While JSX is being transpiled by Babel, in order to make calls in React like React.createElement()


#2

Hey buddy @nature88 I hope this helped you understand the code a bit more, I tried to reply to your original post but I didnt know that the posts can be locked

Happy coding :slight_smile:


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.