This is a demo project, build as part of a job application.
For this project I took the opportunity to try out React Hooks and two unfamiliar libraries that I wanted to test out, Final forms React and Antd. While it provided great fun, I many times scratched my head trying to figure how to pass the correct data to the libraries' functions.
It also raised a question on how to structure the project, the good ol' container/component pattern that always helpt us separating concerns seems obsolete in a Hooks world. Even Dan Abramov states that this is probably the case. How is the future going to look like in terms of reusability? While I do not hold all the answers, I decided to go with a more scene-based approach for this project. In the end, I found myself spending less time jumping around in folders, and it felt pretty straight forward, considering it was my first dedicated Hooks project.
- Clone project
- !IMPORTANT! Setup your Sitoo API-key according to instructions in this readme.
- Follow this instructions for setting up a CORS-proxy. Proxy needs to be running in the background all the time to make requests work.
cd
into your projectnpm i
npm start
The project uses dotenv to provide file with enviromental variables during build time. Here's how you set it up:
- Rename
.env.example
=>.env
- Enter your API-key in .env
REACT_APP_SITOO_API_KEY=${enter your sitoo api key here}
Please note that you need to restart React Create App server after each change to .env-file.
- Node.js (project built with v10.15.1, but might run with other versions as well. No guaranties. Stuff can break