Created
July 10, 2021 13:44
-
-
Save Davidegloh/a9ba84341b0a619546508419d6f2d9a3 to your computer and use it in GitHub Desktop.
[photo dans react]#photoreact
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Si je veux télécharger la photo et l'avoir dans mes données, je la met dans le dossier du composant en question. Dans cette exmeple | |
//s'agit de "Item". | |
import { useState } from 'react'; | |
import './item.css'; | |
//J'importe la photo à cet endroit | |
import Ethereum from './Ethereum.jpg'; | |
function Item(){ | |
return ( | |
<div> | |
<h1 class="titre-item">Hello depuis Item et juste | |
en bas voici une photo Ethereum </h1> | |
//Je fais référence à la photo ici | |
<img src={Ethereum} alt="" /> | |
</div> | |
) | |
} | |
export default Item; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment