A
A
Arthur2018-07-02 18:44:43
React
Arthur, 2018-07-02 18:44:43

Why swears at

Good evening. I can’t deal with such a problem - I’m trying to display a react component in the browser, but for some reason it doesn’t accept JSX syntax. If you write everything in one HTML document, and specify type = "text/babel" in the script tag, then everything is rendered well . And I have two files - HTML and JS. How to bind babel to JS file? Or maybe something else?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Filippov, 2018-07-02
@TurnerIT

you need to transpile the jsx code, work with create-react-app to get started perfect

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question