-
๐ฌ Ask me about: cats, anime, music recommendations!
-
๐ Pronouns: she/her
-
โก Fun fact: I love collecting stuff!
- LinkedIn: Natalia Poletaeva
- E-mail: [email protected]
This web-page allows user to reserve and cancel rockets, and join and leave space missions by SpaceX. The project is built with React&Redux.
License: MIT License
๐ฌ Ask me about: cats, anime, music recommendations!
๐ Pronouns: she/her
โก Fun fact: I love collecting stuff!
Rockets that have already been reserved should show a "Reserved" badge and "Cancel reservation" button instead of the default "Reserve rocket" (as per design)
Use the React conditional rendering syntax:
{rocket.reserved && (
// render Cancel Rocket button
)}
useSelector()
Redux Hook to select the state slices and render lists of missions in corresponding routes. i.e.:// get rockets data from the store
const rockets = useSelector(state => state.rockets);
Fetch data from the Missions endpoint (https://api.spacexdata.com/v3/missions) when a user navigates to the Missions section.
Once the data are fetched, dispatch an action to store the selected data in Redux store:
NOTE: Make sure you only dispatch those actions once and do not add data to store on every re-render (i.e. when changing views / using navigation).
useSelector()
Redux Hook to select the state slices and render lists of rockets in corresponding routes. i.e.:// get rockets data from the store
const rockets = useSelector(state => state.rockets);
flickr_images
.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.:const newState = state.map(rocket => {
if(mission.id !== id)
return mission;
return { ...mission, reserved: true };
});
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).
Use the React conditional rendering syntax:
{rocket.reserved && (
// render Cancel Rocket button
)}
We have set up a kanban board to work on this project in a group of two people.
reserved
key to false
.reserved
key to false
.<NavLink />
for the page navigation links and style active class to indicate which section/page the user is currently on (underline active navigation link).Render a list of all joined missions (use filter()
) on the "My profile" page.
<NavLink />
for the page navigation links and style active class to indicate which section/page the user is currently on (underline active navigation link).Render a list of all reserved rockets (use filter()
) on the "My profile" page.
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.:const newState = state.map(rocket => {
if(rocket.id !== id)
return rocket;
return { ...rocket, reserved: true };
});
Fetch data from the Rockets endpoint (https://api.spacexdata.com/v3/rockets) when the application starts (as Rockets is the default view).
Once the data are fetched, dispatch an action to store the selected data in Redux store:
NOTE: Make sure you only dispatch those actions once and do not add data to store on every re-render (i.e. when changing views / using navigation).
<NavLink />
for the page navigation links and style active class to indicate which section/page the user is currently on (underline active navigation link).A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.