0

I am a beginner to Web development technologies. Recently I have started learning React. When I started my hands-on in React, I was told to install Node js in my machine and later started building the app using npm and npx. My question is what is the need of Node Js here? Please explain its role.

I learnt that Node Js is a Javascript runtime environment. Before using React, when I wrote plain javascript, I used to simply run html file in chrome browser. It worked! Chrome uses V8 engine to compile javascript to machine code. In the similar way, why can't we run React app? Why do we need server here? Ultimately we see our UI running in browser only. Please explain this process in detail. I am confused a lot! Please help.

I tried learning in so many websites. But I didn't find anything that caters to my question.

  • note in particular the answer to the duplicate that tells you how you can indeed use React with just cdn links to the React source in an HTML file, the way you are used to. – Robin Zigmond Nov 13 '22 at 11:45
  • PS I'm disappointed to see this downvoted. It's a very reasonable question and well expressed imo. Yes it's one that's been asked before but we can't assume everyone who comes to Stack Overflow has done a thorough search of the site first, particularly when they might not even know which terms to search. – Robin Zigmond Nov 13 '22 at 11:46
  • @RobinZigmond Thank you for acknowledging. Please explain in detail to a beginner like me with some examples. I need all the necessary points. Thank you. – Desai Vibha Nov 13 '22 at 11:59
  • I'm not really an expert in this area, and there's no need - it's explained better in the duplicate – Robin Zigmond Nov 13 '22 at 12:01

0 Answers0