| ▲ | CooCooCaCha 4 days 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 4 days ago | parent [-] |
| I 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 4 days ago | parent | next [-] | | vite 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. | |
| ▲ | afavour 4 days ago | parent | prev | next [-] | | That’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. | |
| ▲ | NewsaHackO 4 days ago | parent | prev [-] | | Was it in Dev mode? |
|