Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-redux

Package Overview
Dependencies
Maintainers
2
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-redux - npm Package Compare versions

Comparing version 1.7.0 to 1.8.0

28

addon/components/connect.js
import Ember from 'ember';
import shallowEqual from '../-private/equal';
const { computed, defineProperty } = Ember;
const { computed, defineProperty, run } = Ember;

@@ -47,9 +46,13 @@ var connect = function(mapStateToComputed, mapDispatchToActions) {

handleChange() {
var redux = this.get('redux');
var props = mapState(redux.getState());
var componentState = this.getComponentState(props);
var reduxState = finalMapStateToComputed(redux.getState());
if (!shallowEqual(componentState, reduxState)) {
this.updateProps(props);
}
run(() => {
var redux = this.get('redux');
var props = mapState(redux.getState());
var componentState = this.getComponentState(props);
var reduxState = finalMapStateToComputed(redux.getState());
props.forEach((name) => {
if (componentState[name] !== reduxState[name]) {
this.updateProps(name);
}
});
});
},

@@ -63,8 +66,7 @@ getComponentState(props) {

},
updateProps(props) {
props.forEach((name) => {
this.notifyPropertyChange(name);
});
updateProps(name) {
this.notifyPropertyChange(name);
},
willDestroy() {
this._super(...arguments);
if (this.unsubscribe) {

@@ -71,0 +73,0 @@ this.unsubscribe();

ember-redux Changelog
==============================
1.8.0
-----
* [PERFORMANCE]: Avoid unnecessary notifyPropertyChange work
([#38](https://github.com/toranb/ember-redux/pull/38))
* [BUG]: wrap handleChange callback with Ember.run
([#35](https://github.com/toranb/ember-redux/pull/35))
* [BUG]: Call super in component willDestroy
([#31](https://github.com/toranb/ember-redux/pull/31))
* [DOCS]: added yelp clone ember-twiddle example
([commit](https://github.com/toranb/ember-redux/commit/4f0160fde1a09f076fd89b7af6e6c8a017e450ed))
1.7.0

@@ -5,0 +21,0 @@ -----

{
"name": "ember-redux",
"version": "1.7.0",
"version": "1.8.0",
"description": "ember-cli addon that provides simple redux bindings for ember.js",

@@ -5,0 +5,0 @@ "directories": {

@@ -21,4 +21,8 @@ # Ember Redux

Counting Example (simple)
https://ember-twiddle.com/7ce3446b14f166f04064eba663c0a350
Yelp Clone (complex)
https://ember-twiddle.com/64b18c23223fbc1f3a7da8171c6d8881
## Example Container Component

@@ -25,0 +29,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