Kanyorok / spacex-project

In this task, we have worked with the real live data from the SpaceX API. Our task was to build a web application for a company that provides commercial and scientific space travel services. The application allows users to book rockets and join selected space missions..
MIT License
0 stars 1 forks source link

Add the rocketbooking action #41

Closed maths29 closed 1 year ago

maths29 commented 1 year ago

I kindly request you to review the code and provide your valuable feedback. Feel free to comment directly on the pull request or raise any concerns you may have. Your input will greatly contribute to enhancing the quality and functionality of the project.

When a user clicks the "Reserve rocket" button, action needs to be dispatched to update the store. You need to get the ID of the reserved rocket and update the state. Remember you mustn't mutate the state. Instead, you need to return a new state object with all rockets, but the selected rocket will have an extra key reserved with its value set to true. You could use a JS filter() or map() to set the value of the new state -