npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

fluxo-react-connect-stores

v0.0.6

Published

Utility to connect your Fluxo stores on your React.js component

Downloads

289

Readme

#FluxoReactConnectStores Build Status

FluxoReactConnectStores is a utility to connect your Fluxo stores on your React.js component.

###Installation Install with bower or npm and include on your app with some module loader (browserify/webpack/require.js) or include directly on your app through script tag.

$ bower install --save fluxo_react_connect_stores

or

$ npm install --save fluxo-react-connect-stores

####Using with CommonJS module loaders (Webpack/Browserify)

var Connector = require("fluxo-react-connect-stores");
Connector(MyComponent, { comments: commentsStore });

####Using with <script> tag If you include the connector with script tag the connector will be available through window.FluxoReactConnectStores.

##How to use The FluxoReactConnectStores returns a "wrapper component" around your component that listens to the stores. When a store change, this component define new props to your component, causing the component update.

You need specify what stores you are "connecting" on your component like this:

var Connector = require("fluxo-react-connect-stores");

var commentStore = new Fluxo.ObjectStore();

var MyComponentConnected =
  Connector(MyComponent, { comment: commentStore });

The first argument is the component that you will connect and the second one is a literal object where the key is the store name and the value is the store instance.

All connected store data will be placed on the component's props. Take a look on the example below.

var Connector = require("fluxo-react-connect-stores");

// A new instance of Fluxo.Store
var comment = new Fluxo.Store({ content: "My comment" });

// My component
var MyComponent = React.createClass({
  render: function() {
    // Present my store using the object on "this.props.comment"
    return <p>{this.props.comment.content}</p>;
  }
});

// Connect my store on my component
var MyComponentConnected = Connector(MyComponent, { comment: comment });

// Render my connected component
React.render(<MyComponentConnected/>, document.getElementById("app"));

:bulb: You also can check and try this alive on JSFiddle.

###View layer update Whenever your Fluxo stores change, the view layer will be updated with the new stores state. The FluxoReactConnectStores is smart enough to only call setState once per tick, in other words, no matter who many times you change your store on the tick, only one setState will be invoked on view layer with the resulting stores state, improving the view layer performance.


Samuel Simões ~ @samuelsimoes ~ samuelsimoes.com