Skip to content

Instantly share code, notes, and snippets.

@Davidegloh
Created July 10, 2021 13:44
Show Gist options
  • Save Davidegloh/a9ba84341b0a619546508419d6f2d9a3 to your computer and use it in GitHub Desktop.
Save Davidegloh/a9ba84341b0a619546508419d6f2d9a3 to your computer and use it in GitHub Desktop.
[photo dans react]#photoreact
// 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