The endpoint provided has CORS headers on. I developed using a Chrome Extension to circumvent this.
I only show the id from the response. I didn't see much value in displaying the rest of the data given it's all mocked.
I used this as an opportunity to try out 2 libraries I'd not used before, React Query and React Hook Form
cd frontend/company
npm i
npm start
Remember to make sure the cors is off!
npm test
- Non trivial validation.
- Better mobile layout.
- CORS could theoretically be avoided using
no-cors
mode, but we wouldn't be able to see the response data from the server. - Typescript or PropTypes.
- Eject CRA, and sort Babel out so Emotion gives nicer ClassNames.
- Browser test. I only used Mac Chrome.
- Better tests. I test more elements and journeys in the form, and unit test the service.