facebook / create-react-app

Set up a modern web app by running one command.
https://create-react-app.dev
MIT License
102.66k stars 26.83k forks source link

How to run react app on VSCode live server? #10267

Open Hacking-NASSA-with-HTML opened 3 years ago

Hacking-NASSA-with-HTML commented 3 years ago

There are a guy @chwasiq0569 who had been asking, "How to run react app on VSCode live server?" here: https://github.com/facebook/create-react-app/issues/8920

I've found the solution: Just do not forget to put babel-link to your head element; and do not use the E-explorer browser. Like this: https://hacking-nassa-with-html.github.io/Sandbox-for-Javascript/firstReactAsCDNlink/index4.html For educational purposes to work with Live Server is much easier than with create-react-app. IMHO.

BenGenuinest commented 3 years ago

There are a guy @chwasiq0569 who had been asking, "How to run react app on VSCode live server?" here:

8920

I've found the solution: Just do not forget to put babel-link to your head element; and do not use the E-explorer browser. Like this: https://hacking-nassa-with-html.github.io/Sandbox-for-Javascript/firstReactAsCDNlink/index4.html For educational purposes to work with Live Server is much easier than with create-react-app. IMHO.

what do you mean by put babel-link to head element

can you provide a doc or explain in detail what does that mean?

does this mean you can use live-server with react project?

thanks a lot in advance

ps: i know create-react-app has a hot reload module, but it would be nice to see a live-server

divya-goel-mobile commented 3 years ago

@Hacking-NASSA-with-HTML Can you please explain in detail. I am trying to do that and put <script crossorigin="" src="https://unpkg.com/@babel/standalone/babel.min.js"

in header and try to run public/index.html with live server but it shows blank page.