simple preview for image with a input file
npm install image-preview-reacthttps://github.com/lart2000/image-preview-react
JSX
import React, { Component, createElement } from 'react';
import ImageLoad from "image-preview-react";
export default class hola extends Component {
constructor(props) {
super(props);
this.refButton = React.createRef();
this.refImage = React.createRef();
}
componentDidMount() {
ImageLoad({ button: this.refButton, image: this.refImage });
}
render() {
return (
![]()
)
}
}
``