[0.5.0-beta.1] __webpack_require__.$Refresh$.signature is not a function
See original GitHub issueVersion: @pmmmwh/react-refresh-webpack-plugin:0.5.0-beta.1 react-refresh:0.9.0 webpack: 5.21.2 react: 17.0.1
Issue does not occur with @pmmmwh/react-refresh-webpack-plugin:0.5.0-beta.0
Issue:
When using a render prop with a useEffect in the render prop __webpack_require__.$Refresh$.signature is not a function
is thrown.
Reproduction:
function FunctionRenderer({children}) {
return children();
}
function TestComponent() {
return (
<FunctionRenderer>
{() => {
useEffect(() => {}, []);
return <span>Hello</span>;
}}
</FunctionRenderer>
);
}
Other Info: If the render prop is declared externally, this issue does not occur
const externalRenderProp = () => {
useEffect(() => {}, []);
return <span>Hello</span>;
};
function FunctionRenderer({children}) {
return children();
}
function TestComponent() {
return (
<FunctionRenderer>
{externalRenderProp}
</FunctionRenderer>
);
}
If the render prop does not contain a useEffect, this issue does not occur
function FunctionRenderer({children}) {
return children();
}
function TestComponent() {
return (
<FunctionRenderer>
{() => {
- useEffect(() => {}, []);
return <span>Hello</span>;
}}
</FunctionRenderer>
);
}
If the useEffect is not in the render prop this issue does not occur
function FunctionRenderer({children}) {
return children();
}
function TestComponent() {
+
+ useEffect(() => {}, []);
+
return (
<FunctionRenderer>
{() => {
- useEffect(() => {}, []);
return <span>Hello</span>;
}}
</FunctionRenderer>
);
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:6 (2 by maintainers)
Top Results From Across the Web
pmmmwh/react-refresh-webpack-plugin v0.5.8 - npm.io
An EXPERIMENTAL Webpack plugin to enable "Fast Refresh" (also known as Hot Reloading) for React components. This plugin is not 100% stable. We're...
Read more >React hydrate TypeError: __webpack_require__.i(...) is not a ...
I am getting a webpack TypeError when trying to ...
Read more >Gatsby Changelog | 5.3.0
Welcome to gatsby@5.3.0 release (December 2022 #1). Key highlights of this release: ... Partial Hydration is in Beta and not enabled by default....
Read more >Changelog - Cypress Documentation
Fixed an issue with Angular Component Testing where urls within SASS/SCSS files were not being correctly resolved which could result in incomplete styling....
Read more >Changelog | Meteor API Docs
Updated github-oauth to use async functions. ... meteorjs/babel@7.16.1-beta.0 ... Update terser package due to security fixes and to take advantage of ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@pmmmwh Thak you. ETA for a release with this fix?
0.5.0-beta.4
have been released.