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

cortina-react

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cortina-react - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

2

package.json
{
"name": "cortina-react",
"version": "0.1.1",
"version": "0.2.0",
"description": "Coroutine-based EDSL for building React components and applications",

@@ -5,0 +5,0 @@ "author": "Arthur Xavier <arthur.xavierx@gmail.com> (http://arthur-xavier.github.io/)",

import React, { Component } from 'react';
import { Process } from 'cora';
import { all, race } from 'cora/src/combinators';
import { getIterator, isFunction } from 'cora/src/types';

@@ -52,3 +53,3 @@

this.cancel();
if (this.mounted) this.forceUpdate(this.props);
if (this.mounted) this.forceUpdate(this.props, prevProps);
}

@@ -66,6 +67,7 @@

restart(props) {
restart(props, prevProps) {
this.iterator = getIterator(
props.__iterator || this[Symbol.iterator],
props
props,
prevProps
);

@@ -82,4 +84,4 @@ this.target = this.iterator;

forceUpdate(props) {
this.restart(props);
forceUpdate(props, prevProps) {
this.restart(props, prevProps);

@@ -114,2 +116,5 @@ this.promise && this.promise.cancel();

return query;
} else if (query instanceof all || query instanceof race) {
query.handler = this._handler;
return query;
} else {

@@ -116,0 +121,0 @@ return query;

@@ -21,9 +21,19 @@ import { Channel, Query } from 'cora';

this.channel = new Channel();
this.send = value => this.channel.put(value);
this.dispatch = value => this.channel.put(value);
this.take = this.channel.take;
return function*() {
yield this.view(this.send);
yield this.view(this.dispatch);
return this.take;
};
});
export function mapDispatch(actions, dispatch) {
return Object.keys(actions).reduce(
(obj, key) => ({
...obj,
[key]: (...args) => dispatch(actions[key](...args)),
}),
{}
);
}
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