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

@victorpotasso/fluxo

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@victorpotasso/fluxo - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

7

build/connect.js

@@ -15,4 +15,6 @@ "use strict";

Component.call(this, selector);
Component.prototype.render.call(this);
subscribe(() => {
Container.prototype.props = _extends({}, Container.prototype.props, mapStateToProps(getState()));
Container.prototype.props = _extends({}, Container.prototype.props, mapStateToProps(getState));
Component.prototype.render.call(this);

@@ -22,5 +24,6 @@ });

Container.prototype.props = _extends({}, mapStateToProps(getState()), mapDispatchToProps(dispatch, Component.prototype.props));
Container.prototype.props = _extends({}, mapStateToProps(getState), mapDispatchToProps(dispatch, Component.prototype.props));
Object.setPrototypeOf(Container.prototype, Component.prototype);
return Container;

@@ -27,0 +30,0 @@ };

@@ -7,13 +7,15 @@ function connect(mapStateToProps, mapDispatchToProps) {

Component.call(this, selector);
Component.prototype.render.call(this);
subscribe(() => {
Container.prototype.props = {
...Container.prototype.props,
...mapStateToProps(getState()),
...mapStateToProps(getState),
}
Component.prototype.render.call(this);
})
});
};
Container.prototype.props = {
...mapStateToProps(getState()),
...mapStateToProps(getState),
...mapDispatchToProps(dispatch, Component.prototype.props),

@@ -23,2 +25,3 @@ };

Object.setPrototypeOf(Container.prototype, Component.prototype);
return Container;

@@ -25,0 +28,0 @@ }

{
"name": "@victorpotasso/fluxo",
"version": "0.0.2",
"version": "0.0.3",
"description": "vanilla flux",

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

import store from './store';
import Home from './containers/home';
import * as actions from './data/actions';
store.dispatch(actions.update('initial data'));
const home = new Home('section#home-view');

@@ -13,3 +13,2 @@ import { connect } from './../../lib';

this.button.addEventListener('click', this.onClick.bind(this));
this.render();
}

@@ -26,3 +25,3 @@

render() {
// console.log('Home::render props', this.props);
console.log('Home::render props', this.props);
this.title.textContent = this.props.value1;

@@ -33,5 +32,5 @@ this.count.textContent = this.props.value2;

const mapStateToProps = state => ({
value1: `Sample: ${selectors.sample(state)}`,
value2: selectors.count(state),
const mapStateToProps = getState => ({
value1: `Sample: ${selectors.sample(getState())}`,
value2: selectors.count(getState()),
});

@@ -38,0 +37,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