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
When connecting redux, it looses it connects when refreshing browser.
connect(mapStateToProps, mapDispatchToProps). Before refreshing screen, everything prints correctly, however, when you refresh your browse, all the content disappears and only the styles show on print preview.
My component is a class component and is exported as below
I'm not a Redux expert so I can't speak too much about it, but react-to-print should work with any React code, regardless of what state management solution you use. I'm not sure if it's related, but we do have a paragraph about Redux in the README:
The connect method from react-redux returns a functional component that cannot be assigned a reference to be used within the content props' callback in react-to-print. To use a component wrapped in connect within content create an intermediate class component that simply renders your component wrapped in connect. See #280 for more.
When connecting redux, it looses it connects when refreshing browser.
connect(mapStateToProps, mapDispatchToProps). Before refreshing screen, everything prints correctly, however, when you refresh your browse, all the content disappears and only the styles show on print preview.
My component is a class component and is exported as below
export default withStyles(s)(connect(mapStateToProps, mapDispatchToProps, null, { forwardRef: true })(ComponentToPrint))
The text was updated successfully, but these errors were encountered: