oedotme / generouted

Generated file-based routes for Vite
https://stackblitz.com/github.com/oedotme/generouted/tree/main/explorer
MIT License
1.02k stars 47 forks source link

fix react main.ts example #126

Closed Dank-del closed 11 months ago

oedotme commented 11 months ago

Hey @Dank-del, thanks for submitting this.

I'd like to keep the main.tsx file content short for readability, but having the root element as app may be problematic/confusing and it was reported before #99. However, defining React in the files scope or using StrictMode may be a preference and it's not necessary at the getting started sections.

I've updated all examples 268aedd to use root as the html mount target instead of app as that's what you'd get after creating a Vite project. Also tried to follow the getting started steps and it should work perfectly fine:


image



Thanks again.