1
0
Fork 0
This repository has been archived on 2024-09-27. You can view files and clone it, but cannot push or open issues or pull requests.
bearlypassing/frontend/README.md
2024-09-27 11:17:53 +01:00

45 lines
No EOL
1.2 KiB
Markdown

# BearlyPassing web app
## Installing dependencies
```shell
npm install
```
## Running
```sh
npm start
```
## Building
```sh
npm run build
```
## Notes for future maintainers
### React
This was built using React 18. There are `useMemo`s everywhere.
[React has stated that they are working on a compiler](https://react.dev/blog/2024/02/15/react-labs-what-we-have-been-working-on-february-2024#react-compiler),
so a significant amount of this codebase will have to be modified when it comes out.
Also, this project uses [Million.js](https://million.dev/).
This might not be required in the future and should probably be removed at some point.
### Page Routing
BearlyPassing was designed to be a single-page application, so private school information would only be contained in the
tab, and would be deleted (garbage collected) the second they closed the page.
`react-router` had a bit too much overhead, so instead pages are controlled by the `currentPage` and `selectedSection`
variables in [App.tsx](src/App.tsx)
### Authentication and data fetching
Data fetching is extremely rudimentary, and there isn't any error handling above a generic error.
### Final note
There's still some incomplete and missing stuff. Grep for TODOs and good luck!