0

I do not know why my code does not work it says the <div></div> does not work.

render() {
    return (
      <div>
        {this.props.isPrecise
          ? this.state.date.toISOString()
          : this.state.date.toLocaleTimeString()}
      </div>
    );
  }

I do not what to do because this is what i was thought in school.

  • 1
    What do you mean by _"does not work"_? Do you see any errors? Are you using eslint? Or prettier? Which code editor? What does the editor say? – evolutionxbox Dec 09 '21 at 15:22
  • I'm using visual code studio and prettier i don't see any errors but this is what it tells me : "/src/index.js: Support for the experimental syntax 'jsx' isn't currently enabled (10:7):" – Paul Stumpert Dec 13 '21 at 18:48
  • Did you use create-react-app to create the react project? Also take a look here https://stackoverflow.com/questions/63005011/support-for-the-experimental-syntax-jsx-isnt-currently-enabled – evolutionxbox Dec 13 '21 at 20:43
  • no i didn't thanks to you i used it and now it's working – Paul Stumpert Dec 14 '21 at 13:16

0 Answers0