3 ms·
Hello world in react is just a few lines of code that mounts a react component to a dom element. There should be zero network requests beyond the initial downlo
by CooCooCaCha 10mo ago
Hello world in react is just a few lines of code that mounts a react component to a dom element. There should be zero network requests beyond the initial download of html and js.
You’re either doing something wrong or not actually doing a hello world.
- mixmastamyk 10mo agoI don’t know but vite was involved, looks like it was setting up live updates. This is part of the problem, you can’t just include a script apparently.
- iloveplants 10mo agovite adds additional things to your page in dev so that it's easier to debug. when you are running it in production, it is just one js bundle & one css file.
- NewsaHackO 10mo agoWas it in Dev mode?
- afavour 10mo agoThat’s just Vite’s dev mode. I think React is way overused but your example here is a bad one. You just weren’t aware what the dev tool was doing, it has nothing to do with the experience end users will have. It isn’t even anything to do with React.