@victorpotasso/fluxo
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -13,4 +13,4 @@ "use strict"; | ||
return function (Component) { | ||
function Container(selector) { | ||
Component.call(this, selector); | ||
function Container(...args) { | ||
Component.call(this, ...args); | ||
Component.prototype.render.call(this); | ||
@@ -17,0 +17,0 @@ |
@@ -5,4 +5,4 @@ function connect(mapStateToProps, mapDispatchToProps) { | ||
return function (Component) { | ||
function Container(selector) { | ||
Component.call(this, selector); | ||
function Container(...args) { | ||
Component.call(this, ...args); | ||
Component.prototype.render.call(this); | ||
@@ -9,0 +9,0 @@ |
{ | ||
"name": "@victorpotasso/fluxo", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "vanilla flux", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -55,5 +55,5 @@ # fluxo | ||
const mapStateToProps = state => ({ | ||
value1: `Sample: ${selectors.sample(state)}`, | ||
value2: selectors.count(state), | ||
const mapStateToProps = getState => ({ | ||
value1: `Sample: ${selectors.sample(getState())}`, | ||
value2: selectors.count(getState()), | ||
}); | ||
@@ -60,0 +60,0 @@ |
@@ -5,4 +5,6 @@ import store from './store'; | ||
store.dispatch(actions.update('initial data')); | ||
const home = new Home('section#home-view'); | ||
// fake loading | ||
setTimeout(() => { | ||
store.dispatch(actions.update('initial data')); | ||
const home = new Home('section#home-view'); | ||
}, 2000); |
@@ -13,2 +13,3 @@ import { connect } from './../../lib'; | ||
this.button.addEventListener('click', this.onClick.bind(this)); | ||
this.button.style.display = null; | ||
} | ||
@@ -27,3 +28,3 @@ | ||
this.title.textContent = this.props.value1; | ||
this.count.textContent = this.props.value2; | ||
this.count.textContent = `Count: ${this.props.value2}`; | ||
} | ||
@@ -30,0 +31,0 @@ } |
import * as types from './../types'; | ||
const initalState = { | ||
sample: 'initial', | ||
sample: null, | ||
counter: { | ||
@@ -6,0 +6,0 @@ count: 0, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19759
493