Install React Redux, Redux Logger, and React Router
Download the free image for the app logo from the given link.
Create routes and view components (Rockets, Missions, and My Profile). Use for the page navigation links and style active class to indicate which section/page user is currently on (underline active navigation link).
Create directories for all Redux state slice files (rockets, and missions).
Redux: Fetch data and update Redux store
Upon first render fetch data from the SpaceX API endpoints:
Once the data are fetched, dispatch an action to store the selected data in Redux store:
Rockets:
id
rocket_name
description
flickr_images
Missions:
mission_id
mission_name
description
Render UI:lists
Use useSelector() Redux Hook to select the state slices and render lists of rockets and missions in corresponding routes.
Use React Bootstrap, a UI library that could speed up the process. This is a popular library and working with its components would be good practice.
Render a list of rockets (as per design). For the image of a rocket use the first image in the array of flickr_images.
Render a table with the missions' data (as per design).
Redux: Write actions and reducers for booking rockets/dragons and joining missions
When a user clicks the "Reserve rocket" button, action needs to be dispatched to update the store. Get the ID of the reserved rocket and update the state. Don't mutate the state. Instead, Return a new state object with all rockets, but the selected rocket has an extra key reserved with its value set to true. Use a JS filter() and map() to set the value of the new state.
Place all your logic in the reducer. In the React view file, only dispatch the action with the correct rocket ID as an argument.
Create a reducer and action dispatcher for the "Join Mission" button. The logic here is practically the same as with rockets - pass the mission's ID to the corresponding action and update the missions' state with the selected mission having a new key/value - reserved: true.
Redux: Write actions and reducers for canceling rockets/dragons and leaving missions
Follow the same logic as with the "Reserve rocket" and "Join mission" - set the reserved key to false.
Dispatch these actions upon click on the corresponding buttons.
Render UI: conditional components rendering
Rockets that have already been reserved should show a "Reserved" badge and "Cancel reservation" button instead of the default "Reserve rocket" (as per design) .
Missions that the user has joined already should show a badge "Active Member" instead of the default "NOT A MEMBER" and a button "Leave Mission" instead of the "Join Mission" button (as per design).
Render UI: My Profile section
Compose two column layout and list ONLY the rockets reserved and missions joined by the user (as per design):
Render a list of all joined missions (use filter()).
Render a list of all reserved rockets (use filter()).
Technical set up**
Set up the repository on GitHub and use Gitflow.
Set up React and Redux.
Set up testing libraries(React Testing Library and Jest).
Config & basic setup
Redux: Fetch data and update Redux store
Upon first render fetch data from the SpaceX API endpoints:
Once the data are fetched, dispatch an action to store the selected data in Redux store:
Rockets:
Missions:
Render UI:lists
Redux: Write actions and reducers for booking rockets/dragons and joining missions
Redux: Write actions and reducers for canceling rockets/dragons and leaving missions
Render UI: conditional components rendering
Render UI: My Profile section
Technical set up**