jpuri / react-draft-wysiwyg

A Wysiwyg editor build on top of ReactJS and DraftJS. https://jpuri.github.io/react-draft-wysiwyg
MIT License
6.38k stars 1.16k forks source link

Can't call setState on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the i component. #1415

Closed nbblk closed 7 months ago

nbblk commented 7 months ago

Whenever I start typing on editor it throws the error message like that. Seems same issues in the past but it hasn't resolved yet. anyone who knows the workaround?

{
  "name": "soundtrack-fe",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "@react-oauth/google": "^0.12.1",
    "@types/react-draft-wysiwyg": "^1.13.7",
    "draft-js": "^0.11.7",
    "next": "14.0.3",
    "react": "^18",
    "react-dom": "^18",
    "react-draft-wysiwyg": "^1.15.0",
    "react-hook-form": "^7.48.2"
  },
  "devDependencies": {
    "@types/node": "^20",
    "@types/react": "^18",
    "@types/react-dom": "^18",
    "autoprefixer": "^10.0.1",
    "eslint": "^8",
    "eslint-config-next": "14.0.3",
    "postcss": "^8",
    "tailwindcss": "^3.3.0",
    "typescript": "^5"
  }
}
maxoty commented 7 months ago

Remove reactStrictMode or setting reactStrictMode = false

nbblk commented 7 months ago

thanks! it is solved.