CHEWCHEWW / react-web-editor

The react-web-editor is a WYSIWYG editor library. you can resize and drag your component. It also has simple rich text editor
https://reactwebeditor.com
264 stars 35 forks source link

Invalid Hook Call Warning #17

Open MinhHoang2000 opened 2 years ago

MinhHoang2000 commented 2 years ago

When I use react-web-editor, application had a error "Invalid hook call. Hooks can only be called inside of the body of a function component"

CHEWCHEWW commented 2 years ago

Oh! Can you tell me about the specific Situation that occurred this warning? Thank you for letting me know.

prasang-readwhere commented 2 years ago

Hi CHEWCHEWW,

The same errror "Invalid hook call. Hooks can only be called inside of the body of a function component.". Occurred with me as well.

My Steps were as simple as it can be :

  1. Installed the library with npm.
  2. Imported the TextEditorBlock in my component
  3. Boom ! the app was down and displayed errors

index.js:1 The above error occurred in the component: in TextEditorBlock (at StoryBuilder.js:11) in StoryBuilder (created by Context.Consumer) in Route (at Admin.js:130) in Switch (at Admin.js:180) in div (at Admin.js:175) in div (at Admin.js:164)

prasang-readwhere commented 2 years ago

Please fix this, this is great library and might just not be popular because we cannot get past this error

aguiar-tiago commented 2 years ago

+1

timrijkse commented 1 year ago

This is because of mismatching versions in React. I updated the dependencies in this PR https://github.com/CHEWCHEWW/react-web-editor/pull/20

joyceawt commented 8 months ago

hi could this PR be merged please? I'm trying to use this but unable to do so because of the hook warning :(