How to use the fluxible.FluxibleComponent 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 alexaivars / isomorphic-react / app / components / routeHandlers / app.jsx View on Github external
'use strict';

var React   = require('react'),
    Router = require('react-router'),
    RouteHandler = Router.RouteHandler,
    FluxibleComponent = require('fluxible').FluxibleComponent,
    FluxibleMixin = require('fluxible').FluxibleMixin,
    RouterPropTypes = require('react-router/lib/PropTypes');

module.exports = React.createClass({
  mixins: [FluxibleMixin],
  displayName: 'AppHandler',
  contextTypes: {
    router: RouterPropTypes.router.isRequired
  },
  statics: {
    storeListeners: ['DataStore']
  },
  onChange: function () {
	  var query = this.getStore('DataStore').getQuery();
    this.context.router.replaceWith(this.props.pathname, null, query);
  },