Welcome to the GoodRX code challenge
This project is dependent on yarn so please install it globally on your machine or use the Docker commands:
Install all dependencies
yarn
Start a local dev server with hot reloading and serve port 3000 => http://localhost:3000
yarn start
Bundle and optimize all static assets and serve port 3000 => http://localhost:3000
yarn build
yarn serve
Start a local dev server with hot reloading and serve port 3000 => http://localhost:3000
docker-compose -f docker-compose.override.yml up app
Bundle and optimize all static assets and serve on port 80 with NGINX => http://localhost
docker-compose -f docker-compose.yml up app
SearchBar
component.
SearchBar
. As is the "loading" state is quite naive and the tests for the SearchBar
are very monolithic.usePharamcy
hook we are making an HTTP request for every lat
and lng
change as well as for every time a checkbox is checked / unchecked. Ideally, we would cache responses either in local or "redux" state and only make requests for request url's that are not in the cache.This app uses Jest and React Testing Library to test application. React Testing Library proved to be a great asset in testing components that use asynchronous hooks as Enzyme has not yet been updated to work well with React Hooks.
To run tests and watch for changes:
yarn test
To run tests and exit:
yarn test --watchAll=false