You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This might be a really dumb question that belies my lack of understanding, but I'm getting the react-refresh/only-export-components warning when exporting a react-redux connected component like so:
I'm wondering if its "safe" to ignore this warning? My understanding is that connect() returns a wrapper function which in turn returns a connected component. Is this technically an anonymous component?
That not stupid to ask. The rule can't be sure that this connect function returns a component and that this component will be correctly named (important for stack trace). I will verify that the component is correctly named and add an exception for this connect function
This might be a really dumb question that belies my lack of understanding, but I'm getting the react-refresh/only-export-components warning when exporting a react-redux connected component like so:
export default connect(mapStateToProps, mapDispatchToProps)(MyComponent)
I'm wondering if its "safe" to ignore this warning? My understanding is that connect() returns a wrapper function which in turn returns a connected component. Is this technically an anonymous component?
The warning goes away if I change things to:
But is that really doing anything besides circumventing the warning?
Thank you, and apologies if this is incredibly stupid of me to ask.
The text was updated successfully, but these errors were encountered: