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.