2/7 - Separating constructor and render without a comma


#1

https://www.codecademy.com/courses/react-101/lessons/this-state/exercises/initial-state

Just wondering, the instructions mention the following line:
“Make sure not to separate constructor and render with a comma! Methods should never be comma-separated, if inside of a class body. This is to emphasize the fact that classes and object literals are different.”

But I haven’t seen any examples previously with a comma separation? Could someone post an example of when this does occur?

Thanks!


#2

seems the instructions are outdated, in es5 this was required but the course got upgraded to es6:

https://www.codecademy.com/blog/updates-to-learn-reactjs-courses

seems not all instructions where 100% upgraded


#3

Good to know, thought I definitely was missing something.
Thanks!


#4

no, you where not missing anything. Given how many lessons there are, its easy to miss one small piece of instruction


#5

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