-
-
Notifications
You must be signed in to change notification settings - Fork 637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate react-scripts to vite #696
base: master
Are you sure you want to change the base?
Conversation
In DEV mode, you just do: go run . (cd ui && yarn start) In dev mode there is a proxy in vite used to not have CORS problem. You can access the UI on: http://localhost:5173 The UI prefix every request to the backup with `/api` so the proxy can correctly handle it, the proxy strips the `/api` so the backend is equal to production mode.
changing (observed) observable values without using an action
Ok, to sum it up. I tried to update the router, but that is even worse. They broke the complete API and do not even provide a migration script for it. As I mainly develop in Angular I need to read about react before I continue, but it seems that this upgrade to vite is depending on updating all libs to a more current version. If someone else here have a strategy how to update the ui, any feedback is welcome. |
@mfechner I feel you (:, I think the only good way it to start from scratch and copy component by component into a new project, so that you don't have to fix 100 errors to get something working. It's on my todo list, sadly it's multi hour effort. |
@jmattheis thanks a lot for your feedback. I currently study react to better understand react itself. I'm on this task but it will take some time ;) |
The codebase is quite old, pre react hooks. In my experience it wasn't that ergonomic to use contexts for global state, so I've used a lib. Currently I like https://github.com/pmndrs/zustand for it's simplicity and small footprint. |
Fixes #695
To test this modification:
Now access the address
yarn start
shows you.