Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kaplanh/language-cards
https://github.com/kaplanh/language-cards
conditional-rendering react rendering-list usestate-hook
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kaplanh/language-cards
- Owner: kaplanh
- Created: 2022-07-13T14:20:49.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-10T23:22:03.000Z (9 months ago)
- Last Synced: 2024-02-11T00:21:12.657Z (9 months ago)
- Topics: conditional-rendering, react, rendering-list, usestate-hook
- Language: JavaScript
- Homepage: https://kaplan-react-language-card.netlify.app/
- Size: 994 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Language-Cards
![language-cards](https://user-images.githubusercontent.com/101884444/178757500-e555b28e-e40e-4961-8da6-f43e237c5efa.gif)
[:point_right: Click here to see on browser](https://kaplan-react-language-card.netlify.app/)
---| **What's used in this app ?** | **How use third party libraries** | **Author** |
| ---------------------------------------------------------------------------- | ------------------------------------------ | -------------------------------------------------------------------------------- |
| [useState() Hook](https://react.dev/learn#using-hooks)| | [Take a look at my portfolio](https://kaplanh.github.io/Portfolio_with_CssFlex/) |
| [Conditional rendering](https://react.dev/learn#conditional-rendering) | | [Visit me on Linkedin](https://www.linkedin.com/in/kaplan-h/) |
| [rendering list](https://react.dev/learn#rendering-lists) | | |
| [React-Bootstrap](https://react-bootstrap.netlify.app/) | npm i / yarn add react-bootstrap bootstrap | |
| Deploy with [netlify](https://app.netlify.com/teams/kaplanh/overview) | | |---
## How To Run This Project π
### π» Install React π
```bash
yarn create react-app . or npx create-react-app .
```### π» Install Sass π
```bash
yarn add sass or npm i sass
```## π΄ Delete these files and delete the importsπ
- App.test.js
- reportWebVitals.js
- setupTests.js
- favicon.ico
- logo192.png
- logo512.png
- manifest.json
- robots.txt### π» Start the project π
```bash
yarn start or npm start
```OR
- Clone the Repo
```sh
git clone
```- Install NPM packages
```sh
npm install or yarn
```- Run the project
```sh
npm start or yarn start
```- Open the project on your browser
```sh
http://localhost:3000/
```- ### Enjoy! π
---
## Project Skeleton
```
Language-Cards App(folder)
|
|----public (folder)
β βββ index.html
|----src (folder)
| |--- components (folder)
| | |ββ header(folder)
β β | βββ Header.jsx
β β | βββ Header.css
β β |
| | |ββ item(folder)
β β | βββ Item.jsx
β β | βββ Item.css
β β |
| | |ββ card(folder)
β β βββ Card.jsx
β β βββ Card.css
β β
| |--- helper (folder)
| | |ββ data.js
| |
| |--- assets (folder)
| | |ββ images
| |
β β--- App.js
β β--- App.css
β β--- index.js
β β--- img(folder)
β
β
|--- .gitignore
|ββ package-lock.json
βββ package.json
|ββ README.md
|ββ yarn.lock```
---
### At the end of the project, the following topics are to be covered;
```
- conditional rendering
```jsx
import { useState } from 'react';
import './Item.css';
const Item = ({ card }) => {
const [showLogo, setShowLogo] = useState(true);
const { name, img, options } = card;
const handleClick = () => {
setShowLogo(!showLogo);
};
return (
{showLogo ? (
{name}
) : (
{options.map((element, index) => {
return- {element}
;
})}
)}
);
};
export default Item;
```- Rendiring list
```jsx
- {element} ;
{options.map((element, index) => {
return
})}
```
---
## Feedback and Collaboration
I value your feedback and suggestions. If you have any comments, questions, or ideas for improvement regarding this project or any of my other projects, please don't hesitate to reach out.
I'm always open to collaboration and welcome the opportunity to work on exciting projects together.
Thank you for visiting my project. I hope you have a wonderful experience exploring it, and I look forward to connecting with you soon!
β Happy Coding β