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

Bug with forwardRef and memo components #527

Closed
TrejGun opened this issue Oct 25, 2021 · 1 comment
Closed

Bug with forwardRef and memo components #527

TrejGun opened this issue Oct 25, 2021 · 1 comment

Comments

@TrejGun
Copy link

TrejGun commented Oct 25, 2021

Hi guys, thanks for your efforts
I have found a bug where forwardRef and memo crashes website completely
Here is a minimal repo:
https://github.com/TrejGun/react-refresh-bug

Note: there are 3 components inside
Simple - works fine
ForwardRef - fails
Workaround - shows that forwardRef potentially can work

Please take a look at this.
I have also created the same bug in Jack-Works/react-refresh-transformer#9

@Jack-Works
Copy link
Contributor

Jack-Works commented Oct 25, 2021

Hi, you must use ESModule as your TypeScript transpile target as the document said.

module (not target) set to es2015 or later (not work with CommonJS currently.)

https://github.com/Jack-Works/react-refresh-transformer/tree/main/typescript#minimal-requirement

If it's impossible to feed source code as ESModule to webpack, please let me know!

@pmmmwh pmmmwh closed this as completed Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants