-
Notifications
You must be signed in to change notification settings - Fork 439
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
[Vite + React] memo is not defined #1418
Comments
What do you mean I disallowed direct imports from the |
I'm struggling to find the exact reference because I looked through so many issues. It was possibly this one?
|
Same issue, same Vite + React |
Maybe.. I need to find the time to investigate this... maybe in a few days as I am working a demanding full-time job. I do want to help but I have deadlines... |
Similar issue, nextjs 15 react 18/19. Tested in both your implementation and my basic one with both react 18 and 19, got an error regarding memo not being a function. 'use client';
import React from 'react';
import Tags from '@yaireo/tagify/react.tagify';
import '@yaireo/tagify/dist/tagify.css';
export default function Page() {
return (
<div>
<Tags
settings={{
maxTags: 5,
}}
/>
</div>
);
}
|
I'm working on project migrating from webpack to vite already using tagify. My current workaround is to update src/react.tagify.jsx to use:
instead of These async initializations of reexported stuff in react-compat-layer don't work with vite. I have no idea why it's not imported from react in first place |
✅ Prerequisites
💥 Demo Page
To test the full Vite setup I made an example repository here
Explanation
I was very keen to use this plugin as it solves my exact use case, but unfortunately it won't start for my setup.
Should be able to follow the examples and setup instructions to get a working example live.
I hit the following error when running React with Vite:
[vite] TypeError: memo is not a function
from
const Tags = memo(TagifyWrapper);
and the way Vite is transpiling in dev mode looks like this:
After a bit of research I'm wondering if it's because you disallowed direct imports from the
/src/
folder?The text was updated successfully, but these errors were encountered: