Socket
Socket
Sign inDemoInstall

fluxy

Package Overview
Dependencies
110
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.1 to 0.4.2

8

lib/Store.js

@@ -98,5 +98,7 @@ /** @jsx React.DOM */

_notify: function(keys, oldState, newState) {
this.watchers.forEach(function (w) {
w(keys, oldState, newState);
});
if (this.watchers) {
this.watchers.forEach(function (w) {
w(keys, oldState, newState);
});
}
},

@@ -103,0 +105,0 @@

{
"name": "fluxy",
"version": "0.4.1",
"version": "0.4.2",
"description": "",

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

@@ -22,3 +22,3 @@ [![Build Status](https://travis-ci.org/jmreidy/fluxy.svg?branch=master)](https://travis-ci.org/jmreidy/fluxy)

as the single source of data truth. Store *do not replace* the React state system; rather,
React components should use state to handle view-specific data state, and stores to handle applicaiton
React components should use state to handle view-specific data state, and stores to handle application
data state. Stores are event emitters that emit change events for underlying state changes.

@@ -96,3 +96,3 @@

},
toggleExanded: function (expandFlag) {
toggleExpanded: function (expandFlag) {
this.dispatchAction(TodoConstants.TODO_TOGGLE_EXPANDED, expandFlag);

@@ -235,3 +235,3 @@ }

actions: [
[UserConstants.LOGIN_COMPLETED, {waitFor: [SessionStore], function (user) {
[UserConstants.LOGIN_COMPLETED, {waitFor: [SessionStore]}, function (user) {
this.set('user', user);

@@ -255,7 +255,7 @@ }],

for "looking into" the Store state, reaching deeply into a nested data structore. For example, `get(['todos', 571, 'text'])`
is the rough equivalent of `Store.state.todos[571].text`. (Don't worry, ClojureScript won't through an undefined error as it walks
is the rough equivalent of `Store.state.todos[571].text`. (Don't worry, ClojureScript won't throw an undefined error as it walks
its data structure!)
`set(keyOrArrayOfKeys, valOrFn)` is the setter equivalent of `get`. In addition to performing the same flat or deep
access that `get` provides, it can also update a value in one of two aways - either by assigning a value directly, or
access that `get` provides, it can also update a value in one of two ways - either by assigning a value directly, or
as the result of an update function. In the example below...

@@ -268,3 +268,3 @@ ```javascript

There's another few benefits to using the `set` helper. First, it not only updates the Store state - it handles the storage
There are a few other benefits to using the `set` helper. First, it not only updates the Store state - it handles the storage
of the Store's existing state. That's right - the entire history of Store states is tracked in `Store.state`. That means

@@ -341,2 +341,1 @@ you can always call `Store.undo()` to rollback state. After updating the Store's state and state history, `set` will trigger

- [ ] Cleanup internal implementation

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc