Redux: Fetch data and update Redux store
Upon first render, data is fetched from the SpaceX API endpoint:
Rockets: https://api.spacexdata.com/v4/rockets
Once the data are fetched, an action is dispatched to store the selected data in Redux store:
Rockets:
id
rocket_name
description
flickr_images
When a user clicks the "Reserve rocket" button action is dispatched to update the store. The ID of the reserved rocket is gotten and the state updated.
actions and reducers for canceling rockets
Rockets that have already been reserved should show a "Reserved" badge and a "Cancel reservation" button instead of the default "Reserve rocket" (as per design).
Redux: Fetch data and update Redux store Upon first render, data is fetched from the SpaceX API endpoint: Rockets: https://api.spacexdata.com/v4/rockets Once the data are fetched, an action is dispatched to store the selected data in Redux store: Rockets: id rocket_name description flickr_images When a user clicks the "Reserve rocket" button action is dispatched to update the store. The ID of the reserved rocket is gotten and the state updated. actions and reducers for canceling rockets Rockets that have already been reserved should show a "Reserved" badge and a "Cancel reservation" button instead of the default "Reserve rocket" (as per design).