Open januswel opened 6 months ago
Can you give more context? This code creates a component so it should follow some Fast refresh rules
I made a repo to repro
https://github.com/januswel/react-refresh-sample
This problem may occur with RouteObject
s react-router v6
This is the same issue as https://github.com/ArnaudBarre/eslint-plugin-react-refresh/issues/25
I need to dig deeper to see how it really behaves at runtime. Given that SWC and Babel generate some fast refresh code for that for now it's safer to consider that React.lazy
calls are like creating a wrapper component (which is the case)
@ArnaudBarre Thank you for your comment I saw #25 and consider to use workarounds from you
Now, the rule raises errors with the following codes
Can we modify to determine this as the correct code?