The front end is set up with Parcel Bundler, a library that compiles our assets and comes with an integrated development server with auto-reload. This server runs on port 1234
by default, but will use another if 1234
is being used by another application.
The "quotes" API runs on port 3333
which needs to be free, or this server won't be able to start.
- Clone the repo.
- Navigate into the project folder.
- Run
npm install
to download the project's dependencies. - Run
npm run api
to start the "quotes" API locally onhttp://localhost:3333/api/quotes
. - Open a new terminal window at the same directory and run
npm run react
to build the React project and serve it onhttp://localhost:1234
. - Run
npm test
to run tests using Cypress (optional).
Complete eight tasks so the React app is able to work like in this video.
-
Read
server.js
to understand how each endpoint works. The project has no database, so restarting theapi
script returns the quotes to their original state. -
There is a total of eight tasks (tasks 1 through 8) that need to be completed. They are found inside the
Container.js
andForm.js
components. Each tasks includes a log statement with specific instructions. You can tackle the tasks in any order you wish. You do not need to touch any code outside of the tasks.
Use Redux to manage application state.
- Add
redux
andreact-redux
to the project, and use them to centralize application state inside a Redux store. - Connect the
Container.js
component so it receives state and action creators through props.