How to use the fluxible.Mixin function in fluxible

To help you get started, we’ve selected a few fluxible examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github voronianski / flux-comparison / yahoo-fluxible / js / components / CartContainer.jsx View on Github external
'use strict';

var React = require('react/addons');
var Cart = require('../../../common/components/Cart.jsx');
var FluxibleMixin = require('fluxible').Mixin;
var CartStore = require('../stores/CartStore');
var cartCheckout = require('../actions/cartCheckout');

var CartContainer = React.createClass({
    mixins: [FluxibleMixin],

    statics: {
        storeListeners: {
            _onChange: [CartStore]
        }
    },

    _getStateFromStores: function () {
        return {
            products: this.getStore('CartStore').getAddedProducts(),
            total: this.getStore('CartStore').getTotal()
github voronianski / flux-comparison / yahoo-fluxible / js / components / ProductsContainer.jsx View on Github external
'use strict';

var React = require('react/addons');
var ProductItem = require('../../../common/components/ProductItem.jsx');
var ProductsList = require('../../../common/components/ProductsList.jsx');
var FluxibleMixin = require('fluxible').Mixin;
var ProductStore = require('../stores/ProductStore');
var addToCart = require('../actions/addToCart');

var ProductItemContainer = React.createClass({
    mixins: [FluxibleMixin],

    onAddToCartClicked: function () {
        this.executeAction(addToCart, {
            product: this.props.product
        });
    },

    render: function () {
        return (
            
        );
github voronianski / flux-comparison / yahoo-fluxible / js / components / App.jsx View on Github external
'use strict';

var React = require('react');
var CartContainer = require('./CartContainer.jsx');
var ProductsContainer = require('./ProductsContainer.jsx');
var FluxibleMixin = require('fluxible').Mixin;

var App = React.createClass({
    mixins: [FluxibleMixin],
    render: function () {
        return (
            <div>
                
                
            </div>
        );
    }
});

module.exports = App;