react-easy-crop
react-cropper
react-easy-crop | react-cropper | |
---|---|---|
2 | 1 | |
2,226 | 2,033 | |
- | 1.2% | |
0.0 | 4.1 | |
7 months ago | over 1 year ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
react-easy-crop
-
Really smooth avatar chooser I made
Idk what tech OP used, but if you're working on React this is literally just react-easy-crop out of the box. https://www.npmjs.com/package/react-easy-crop
-
Crop and Upload Image Service
Once a user selects an image, he can modify the image(crop, zoom, rotate) via react-easy-crop library.
react-cropper
-
this.setState is not a function ( trying Upload Image) ReactJs
Reactjs Try create upload function with cropper component. But when I try set state it says that Uncaught TypeError: this.setState is not a function at FileReader.reader.onload Component import React, { Component, PropTypes } from 'react'import { Link, browserHistory } from 'react-router'import { connect } from 'react-redux'import Cropper from 'react-cropper';class HeadPortrait extends Component { constructor(props) { super(props) this.state = { image: '', } } clickadd(e) { document.getElementById('uploadfiles').click(); } loadFile(e) { e.preventDefault(); var reader = new FileReader(); reader.onload = function () { this.setState({ image: reader.result }) }; reader.readAsDataURL(e.target.files[0]); ; }; _crop() { // image in dataUrl console.log(this.refs.cropper.getCroppedCanvas().toDataURL()); } render() { return ( Add Image Save ) }}function mapStateToProps(state) { return { // stories: state.stories }}export default connect(mapStateToProps)(HeadPortrait) Trying do like in example https://github.com/roadmanfong/react-cropper/blob/master/example/src/Demo.jsx Answer link : https://codehunter.cc/a/reactjs/this-setstate-is-not-a-function-trying-upload-image-reactjs
What are some alternatives?
react-advanced-cropper - The react cropper library that embraces power of the advanced cropper core to give the possibility to create croppers that exactly suited for your website design
react-easy-crop - A React component to crop images/videos with easy interactions
pikaso - Seamless, headless and fully tested HTML5 Canvas library
chakra-ui - Chakra UI is a component system for building products with speed ⚡️
react-mobile-cropper - The react mobile cropper highly inspirited by popular Android mobile croppers.
rsuite - 🧱 A suite of React components .
react-image-crop - A responsive image cropping tool for React
reactour - Tourist Guide into your React Components
mantine - A fully featured React components library
image-service-example