8/15 (nested JSX) getting error


#1


https://www.codecademy.com/courses/react-101/lessons/react-jsx-intro/exercises/nested-jsx

Why am I getting error when running the code?!!

var myDiv = {
  <div>
    <h1>
      Hello world
    </h1>
    </div>
};


#2

from the instructions:

If a JSX expression takes up more than one line, then you should wrap the multi-line JSX expression in parentheses

parentheses: ()
you use curly brackets, {}


#3

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