this.setState is not a function ( trying Upload Image) ReactJs

This page summarizes the projects mentioned and recommended in the original post on /r/codehunter

SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • react-cropper

    Cropperjs as React component

  • 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

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • OpenAI Bought Chatgpt.com

    1 project | news.ycombinator.com | 4 May 2024
  • Create a simple Server using Express.js.

    1 project | dev.to | 4 May 2024
  • OpenUI - One prompt UI Generation

    1 project | dev.to | 4 May 2024
  • VC Code in the browser – Self hosted, sync between devices

    1 project | news.ycombinator.com | 4 May 2024
  • Show HN: I built a free in-browser Llama 3 chatbot powered by WebGPU

    8 projects | news.ycombinator.com | 3 May 2024