new Compressor(file, {
quality: 0.6,
// The compression process is asynchronous,
// which means you have to access the `result` in the `success` hook function.
success(result) {
// in this place how we define the setstate. i did setimagedata(result), it show error
},
});
please would you explain me. i am new here