Fast refresh breaks when using nextjs withRouter HOC
See original GitHub issueIt seems that withRouter
HOC from “next/router” starts displayName
with a small letter.
if (process.env.NODE_ENV !== 'production') {
const name =
ComposedComponent.displayName || ComposedComponent.name || 'Unknown'
WithRouterWrapper.displayName = `withRouter(${name})`
}
Would it make sense to change the capital letter requirement?
https://github.com/vercel/next.js/blob/canary/packages/next/client/with-router.tsx
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Basic Features: Fast Refresh - Next.js
Fast Refresh is a Next.js feature that gives you instantaneous feedback on edits made to your React components. Fast Refresh is enabled by...
Read more >withAuthUser() HOC prevents Fast Refreshing / HMR #163
Fast Refresh requires at least one parent function component in your React tree.
Read more >Nextjs - Fast Refresh throws error on any page other than index
I ran into a weird issue with my recent Nextjs build that I cannot figure out. Any page other than the index.js page...
Read more >Client-Side Routing In Next.js - Smashing Magazine
Routing is the process through which the user is navigated to different pages on a website. Rendering is the process of putting those...
Read more >refresh the page next js Code Example
how to redirect programatically in nextjs · react router next page top · how to reload page with router next js · refresh...
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 Free
Top 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
New version has been published, you’ll have to upgrade
@prefresh/webpack
to the new patch! Thanks for the detailed issueFeel free to raise a PR 👍