Socket
Socket
Sign inDemoInstall

reflux

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reflux - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

src/connectFilter.js

7

CHANGELOG.md

@@ -5,5 +5,10 @@ # Changelog

## v0.2.5
* Added `connectFilter` [#222](https://github.com/spoike/refluxjs/pull/222)
* A lot of clarifications and typo fixes in documentation. [#147](https://github.com/spoike/refluxjs/pull/147), [#207](https://github.com/spoike/refluxjs/pull/207), [#208](https://github.com/spoike/refluxjs/pull/208), [#209](https://github.com/spoike/refluxjs/pull/209), [#211](https://github.com/spoike/refluxjs/pull/211), and [#214](https://github.com/spoike/refluxjs/pull/214)
## v0.2.4
* Promisable actions [#186](https://github.com/spoike/refluxjs/issues/186)
* Promisable actions [#185](https://github.com/spoike/refluxjs/issues/185)
* Fixed IE8 bug [#202](https://github.com/spoike/refluxjs/issues/202), [#187](https://github.com/spoike/refluxjs/issues/187)

@@ -10,0 +15,0 @@ * Plus other various fixes: [#201](https://github.com/spoike/refluxjs/issues/201), [#200](https://github.com/spoike/refluxjs/issues/202), [#183](https://github.com/spoike/refluxjs/issues/183), and [#182](https://github.com/spoike/refluxjs/issues/182)

2

package.json
{
"name": "reflux",
"version": "0.2.4",
"version": "0.2.5",
"description": "A simple library for uni-directional dataflow application architecture inspired by ReactJS Flux",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -44,3 +44,3 @@ # RefluxJS

* The singleton dispatcher is removed in favor for letting every action act as dispatcher instead.
* Because actions are listenable, the stores may listen to them. Stores don't need to have a big switch statements that does static type checking (of action types) with strings
* Because actions are listenable, the stores may listen to them. Stores don't need to have big switch statements that do static type checking (of action types) with strings
* Stores may listen to other stores, i.e. it is possible to create stores that can *aggregate data further*, similar to a map/reduce.

@@ -57,2 +57,4 @@ * `waitFor` is replaced in favor to handle *serial* and *parallel* data flows:

* [Todo Example Project](https://github.com/spoike/refluxjs-todo) - [http://spoike.github.io/refluxjs-todo/](http://spoike.github.io/refluxjs-todo/)
* [Hacker News Clone](https://github.com/echenley/react-news) by echenley
* [Another Todo Project with a Python backend](https://github.com/limelights/todo-reflux) by limelights

@@ -194,3 +196,3 @@ ## Installation

}
}
})
}

@@ -203,3 +205,3 @@ });

```javascript
makeRequest('/api/somethign').then(function(body) {
makeRequest('/api/something').then(function(body) {
// Render the response body

@@ -506,2 +508,23 @@ }).catch(function(err) {

#### Using Reflux.connectFilter
`Reflux.connectFilter` is used in a similar manner to `Reflux.connect`. Use the
`connectFilter` mixin when you want only a subset of the items in a store. A
blog written using Reflux would probably have a store with all posts in
it. For an individual post page, you could use `Reflux.connectFilter` to
filter the posts to the post that's being viewed.
```javascript
var PostView = React.createClass({
mixins: [Reflux.connectFilter(postStore,"post", function(posts) {
posts.filter(function(post) {
post.id === this.props.id;
});
}],
render: function() {
// render using `this.state.post`
}
});
```
### Listening to changes in other data stores (aggregate data stores)

@@ -582,3 +605,3 @@

For better alternative to `setTimeout`, you may opt to use the [`setImmediate` polyfill](https://github.com/YuzuJS/setImmediate).
For better alternative to `setTimeout`, you may opt to use the [`setImmediate` polyfill](https://github.com/YuzuJS/setImmediate), [`setImmediate2`](https://github.com/Katochimoto/setImmediate) or [`macrotask`](https://github.com/calvinmetcalf/macrotask).

@@ -585,0 +608,0 @@

@@ -15,2 +15,4 @@ exports.ActionMethods = require('./ActionMethods');

exports.connectFilter = require('./connectFilter');
exports.ListenerMixin = require('./ListenerMixin');

@@ -17,0 +19,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc