A web application for a company that provides commercial and scientific space travel services. The application will allow users to book rockets and join selected space missions.
Use useSelector() Redux Hook to select the state slices and render lists of missions in corresponding routes. i.e.:
// get rockets data from the storeconstrockets=useSelector(state=>state.rockets);
You can style the whole application "by hand" or you could 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 table with the missions' data (as per design).
Use useSelector() Redux Hook to select the state slices and render lists of dragons in corresponding routes. i.e.:
// get rockets data from the storeconstrockets=useSelector(state=>state.rockets);
You can style the whole application "by hand" or you could 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 dragons (as per design). For the image of a dragon use the first image in the array of flickr_images.
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).
When a user clicks the "Join Mission" button, action needs to be dispatched to update the store. You need to get the ID of the selected mission and update the state. Remember you mustn't mutate the state. Instead, you need to return a new state object with all missions, but the selected mission 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 - i.e.:
Regardless of which method you choose, make sure you place all your logic in the reducer. In the React view file, you should only dispatch the action with the correct rocket ID as an argument.
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 - i.e.:
Regardless of which method you choose, make sure you place all your logic in the reducer. In the React view file, you should only dispatch the action with the correct rocket ID as an argument.
Create a route and a view component. Use <NavLink /> for the page navigation links and style active class to indicate which section/page the user is currently on (underline active navigation link).
This view should be empty - you will add content in separate tasks.
Create a route and a view component. Use <NavLink /> for the page navigation links and style active class to indicate which section/page the user is currently on (underline active navigation link).
Create a directory for all Redux state slice files.
Create a route and a view component. Use <NavLink /> for the page navigation links and style active class to indicate which section/page the user is currently on (underline active navigation link).
Create a directory for all Redux state slice files.
Use useSelector() Redux Hook to select the state slices and render lists of rockets in corresponding routes. i.e.:
// get rockets data from the storeconstrockets=useSelector(state=>state.rockets);
You can style the whole application "by hand" or you could 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.
Create a route and a view component. Use <NavLink /> for the page navigation links and style active class to indicate which section/page the user is currently on (underline active navigation link).
Create a directory for all Redux state slice files.
Dragons that have already been reserved should show a "Reserved" badge and "Cancel reservation" button instead of the default "Reserve dragon" (as per design).
When a user clicks the "Reserve dragon" button, action needs to be dispatched to update the store. You need to get the ID of the reserved dragon and update the state. Remember you mustn't mutate the state. Instead, you need to return a new state object with all dragons, 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 - i.e.:
Regardless of which method you choose, make sure you place all your logic in the reducer. In the React view file, you should only dispatch the action with the correct dragon ID as an argument.
Rockets that have already been reserved should show a "Reserved" badge and "Cancel reservation" button instead of the default "Reserve rocket" (as per design)