Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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


    {options.map((element, index) => {
    return
  • {element}
  • ;
    })}

```

---

## 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 ✍