This project is meant to demonstrate some concepts from Chapter 8 of Clean Code. You can view the demo app here: http://tylerhawkins.info/boundaries-demo/build/
Wrap third-party code in a thin layer of abstraction. This allows you to:
- Create your own interface
- More easily mock the third-party library in your code
- Easily adapt to changes in the third-party library's API
- Swap out underlying libraries if you want to change libraries in the future
Write "learning tests" to document a third-party library. This allows you to:
- Document how you intend to use the library
- Easily catch breaking changes in the library when you upgrade dependencies
Use mock data when the code you're integrating with doesn't exist yet. This allows you to:
- Not be blocked if you're a frontend developer waiting on a backend developer to create the backend API
yarn install
yarn start
- Navigate to http://localhost:3000/ in your browser
- Day.js format: https://day.js.org/docs/en/display/format
- Day.js time from now: https://day.js.org/docs/en/display/from-now
- Moment.js: https://momentjs.com/
- date-fns: https://date-fns.org/
- date-fns format: https://date-fns.org/v2.25.0/docs/format
- date-fns time from now: https://date-fns.org/v2.25.0/docs/formatDistanceToNow