Intro to React JS part 1 5/18


#1

getting an error here but i cant scroll up on the error log to read the error. very frustrating codeacademy.. any idea what is wrong here?

var React = require('react');
var ReactDOM = require('react-dom');

// Write code here:
var math =

{2 + 3 = 2 + 3}


ReactDOM.render(math, document.getElementById('app'));

#2

This is not a valid JavaScript expression. Consider that the left side of the equals (including the equal sign) should be string data, and the right side becomes an expression.

2 + 3 = {2 + 3}

Now the expression will render AFTER JavaScript evaluates it.

2 + 3 = 5

#3

thank you for your help! that makes a lot of sense. It might be good to change the wording on this problem as it is a bit confusing the way it written now.


#4

We'll have to wait until this course is more mature to see what issues/concerns users raise. I can't share in the confusion, though.


#5

Thanks for posting this. I was confused with the language too.


#6

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