Dev Stack is a responsive React website that helps developers explore different technologies and build their ideal development stack.
Users can browse technologies, see their category, difficulty and rating, and add their favorite technologies to their personal stack.
- React.js
- JavaScript (ES6+)
- Vite
- CSS
- JSON
- React Toastify
- Lucide React
Users can browse different frontend, backend, database, language, styling and DevOps technologies.
Users can add technologies to their personal stack and remove them whenever they want.
The website works on desktop, tablet and mobile devices with a responsive layout.
JSX is a syntax that lets us write HTML-like code inside JavaScript.
It makes React components easier to read and write.
Props are data passed from a parent component to a child component.
State is data managed inside a component that can change over time.
useState allows a React component to store and update data.
I used it to store the technologies selected by the user in the "Your Stack" section.
I also used it for the mobile navigation menu.
useEffect is used to perform side effects in a React component.
I used it to load the technology data from the JSON file and update the loading state after the data was loaded.
React uses the key to identify each item in a list.
A unique key helps React understand which item was added, removed or changed.
Example:
{technologies.map((tech) => ( <TechnologyCard key={tech.id} tech={tech} /> ))}
Answer:
Conditional rendering means showing different UI elements depending on a condition.
In my project, if the user's stack is empty, I show an empty-state message. If technologies have been added, I show the selected technologies.
Example:
{stack.length === 0 ? (
Your stack is empty.
) : ( )}7. How do you pass data from a parent component to a child component, and how does a child send something back to the parent?
Answer:
A parent component can pass data to a child component using props.
For example:
<TechnologyCard tech={tech} />