I am new to react.js and JS in general. I am looking for an example of code that:
- uses react functions, not classes.
- let the user upload an image using
- then display that image on the screen
Thanks in advance.
I am new to react.js and JS in general. I am looking for an example of code that:
Thanks in advance.
First image should copy in to project path and import that into your page
import img from "../../assets/img/logo.svg";
render() {
return (
<div className="content" >
<img id="logo-img" src={img} alt="logo" />
</div>
)
}