RIP21 / react-simplemde-editor

React wrapper for simplemde (easymde) markdown editor

Home Page:https://react-simplemde-edtior.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError `_react.useMemo` is not a function

arnaskro opened this issue · comments

I've been trying to setup react-simplemde-editor but I keep running into the same issue

TypeError
(0 , _react.useMemo) is not a function

As you'll see in the example below, only things installed are react-simplemde-editor easymde react react-dom.
Have I missed anything for the setup?

Code Sandbox example

Try using not 18.0.0 React version but whatever is latest version is. This can be a culprit of it all.
I haven't checked the example as I'm from phone. But it's just a sophisticated guess.

I've tried with React 18.1.0 and 18.2.0 still the same result. Not sure what's going on.

Update: I've changed react-simplemde-editor version to 5.0.2 instead of 5.2.0 and it's working now.

@arnaskro funny thing is that it's still broken in the CodeSandbox example even tho it uses 5.2.0. But it uses Webpack, if I do exact code but Vite, it all works. So I guess it's still a problem of bundling to some extend, but maybe of Webpack rather than a bundler that I use. (which is tsup) either way. Will keep it open for some time.