redux 'connect' and GSAP
juanzone opened this issue · 2 comments
juanzone commented
Hello,
How can I use react-gsap-enhancer with redux in my react component?
When i export my class with 'connect' for redux how can I put GSAP?
exemple: 'export default connect(mapStateToProps, mapDispatchToProps)(Component)'
Thanks :)
benstepp commented
When using multiple higher order components we use the compose helper from redux where I work.
import { compose } from 'redux'
export default compose(
connect(mapStateToProps, mapDispatchToProps),
GSAP(),
)(MyComponent)
You could also just do the composing manually instead
export default connect(mapStateToProps, mapDispatchToProps)(GSAP()(MyComponent))
juanzone commented
Thanks for the help mate!
I'll use the compose helper ;)