This project is the front-end interface for the World Food Programme's PRISM project. It displays data, forecasts, and impact projections on a configurable map interface.
This project was bootstrapped with Create React App, using the Redux and Redux Toolkit template with TypeScript.
- Styling & UI Library Use Material UI. Note that to use the styles API you can
import @material-ui/core/styles
. - Routing Uses React Router.
- Mapping Uses MapBox. To use the app, you will need to create a token and add it as
REACT_APP_MAPBOX_TOKEN
in a.env
file at the root folder. - State Management Uses Redux
- Testing Uses Jest with Enzyme
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Runs eslint
for all the source files. We use a custom Eslint configuration in ./eslintrc
along with prettier
(configured with ./.prettierrc
) to enforce consistency and code quality. If you would like eslint to try to automatically "fix" files if it can, run yarn lint --fix
.
By default, a pre-commit hook is defined to run linting tasks on all staged code before allowing a commit. This occurs using the lint-staged package, and can be configured in ./package.json#lint-staged
. The precommit task can be run manually using yarn precommit
.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.