Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError _react.useMemo is not a function #217

Open
arnaskro opened this issue Dec 6, 2022 · 3 comments
Open

TypeError _react.useMemo is not a function #217

arnaskro opened this issue Dec 6, 2022 · 3 comments
Assignees
Labels

Comments

@arnaskro
Copy link

arnaskro commented Dec 6, 2022

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

@RIP21
Copy link
Owner

RIP21 commented Dec 6, 2022

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.

@arnaskro
Copy link
Author

arnaskro commented Dec 6, 2022

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.

@RIP21 RIP21 self-assigned this Dec 7, 2022
@RIP21 RIP21 added the bug label Dec 7, 2022
@RIP21
Copy link
Owner

RIP21 commented Dec 7, 2022

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants