djinn-state-react
Advanced tools
Comparing version 0.0.3 to 1.0.1
/// <reference types="react" /> | ||
import { Djinn } from 'djinn-state'; | ||
import { ServicesDescription, ServiceStateMapping } from './types'; | ||
export declare const createDjinnConnector: (djinn: Djinn) => (services: ServicesDescription, mapping?: ServiceStateMapping | undefined) => (component: any) => (props: any) => JSX.Element; | ||
export declare const createDjinnConnector: (djinn: Djinn) => (services: ServicesDescription, mapping?: ServiceStateMapping | undefined) => (component: any) => (props: any) => import("react").ComponentElement<import("./DjinnConnection").IProps, import("./DjinnConnection").DjinnConnection>; | ||
//# sourceMappingURL=createDjinnConnector.d.ts.map |
import { Djinn, DjinnService } from 'djinn-state'; | ||
import React from 'react'; | ||
import { ServicesDescription, ServiceStateMapping } from './types'; | ||
interface IProps { | ||
export interface IProps { | ||
djinn: Djinn; | ||
@@ -24,3 +24,2 @@ services: ServicesDescription; | ||
} | ||
export {}; | ||
//# sourceMappingURL=DjinnConnection.d.ts.map |
/// <reference types="react" /> | ||
import { Djinn } from 'djinn-state'; | ||
import { ServicesDescription, ServiceStateMapping } from './types'; | ||
export declare const djinnConnector: (djinn: Djinn, services: ServicesDescription, component: any, mapping?: ServiceStateMapping | undefined) => (props: any) => JSX.Element; | ||
import { DjinnConnection, IProps } from './DjinnConnection'; | ||
export declare const djinnConnector: (djinn: Djinn, services: ServicesDescription, Component: any, mapping?: ServiceStateMapping | undefined) => (props: any) => import("react").ComponentElement<IProps, DjinnConnection>; | ||
//# sourceMappingURL=djinnConnector.d.ts.map |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var react_1 = __importDefault(require("react")); | ||
var react_1 = require("react"); | ||
var DjinnConnection_1 = require("./DjinnConnection"); | ||
exports.djinnConnector = function (djinn, services, component, mapping) { | ||
return function (props) { return (react_1.default.createElement(DjinnConnection_1.DjinnConnection, { djinn: djinn, services: services, mapping: mapping, Component: component, props: props })); }; | ||
exports.djinnConnector = function (djinn, services, Component, mapping) { | ||
return function (props) { | ||
return react_1.createElement(DjinnConnection_1.DjinnConnection, { | ||
Component: Component, | ||
djinn: djinn, | ||
mapping: mapping, | ||
services: services, | ||
props: props, | ||
}); | ||
}; | ||
}; |
{ | ||
"name": "djinn-state-react", | ||
"version": "0.0.3", | ||
"version": "1.0.1", | ||
"description": "djinn-state helpers for react", | ||
@@ -45,3 +45,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"djinn-state": "^1.0.0", | ||
"djinn-state": "^1.0.1", | ||
"react": "^16.7.0", | ||
@@ -48,0 +48,0 @@ "react-dom": "^16.7.0" |
@@ -39,11 +39,11 @@ # Djinn-state react | ||
decrement() { | ||
decrement = () => { | ||
const count = this.state.count - 1; | ||
this.patch({ count }); | ||
} | ||
}; | ||
increment() { | ||
increment = () => { | ||
const count = this.state.count + 1; | ||
this.patch({ count }); | ||
} | ||
}; | ||
} | ||
@@ -50,0 +50,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
21753
414
1
Updateddjinn-state@^1.0.1