Last active
April 25, 2016 17:31
-
-
Save sammylupt/95a52f6f3dce2e64baffc845870be17b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { addToCart } from "shared/lib/actions" | |
class ProductContainer extends React.Component { | |
// ... | |
addToCart(product) { | |
const { dispatch, navigator } = this.props | |
return dispatch(addToCart(product, () => { | |
const route = Router.getCartRoute() | |
navigator.push(route) | |
})) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment