action-component
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "action-component", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Snabbdom based functional components", | ||
@@ -10,3 +10,3 @@ "main": "index.js", | ||
"semantic-release": "semantic-release", | ||
"travis-deploy-once": "travis-deploy-once", | ||
"travis-deploy-once": "travis-deploy-once --pro", | ||
"prettier": "git ls-files | grep '.ts$' | xargs prettier --write --config=.prettierrc" | ||
@@ -36,3 +36,3 @@ }, | ||
"ramda": "^0.25.0", | ||
"semantic-release": "^15.7.1", | ||
"semantic-release": "^15.8.0", | ||
"travis-deploy-once": "^5.0.1", | ||
@@ -39,0 +39,0 @@ "ts-node": "^7.0.0", |
# Action Component | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/tusharmath/action-component.svg)](https://greenkeeper.io/) | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/tusharmath/action-component.svg)](https://greenkeeper.io/) [![Build Status](https://travis-ci.com/tusharmath/action-component.svg?branch=master)](https://travis-ci.com/tusharmath/action-component) | ||
@@ -5,0 +5,0 @@ [Action] based functional components |
import { Action } from 'action-type'; | ||
import { Hoe } from 'hoe'; | ||
export declare type Component<State, Params, VNode> = { | ||
init: { | ||
(p?: Partial<State>): State; | ||
}; | ||
update: <T>(action: Action<T>, state: State) => State; | ||
command: <T, R>(action: Action<T>, state: State) => Action<R>; | ||
view: (e: Hoe, m: State, p: Params) => VNode; | ||
}; | ||
export interface Component<State, Params, VNode> { | ||
init(p?: Partial<State>): State; | ||
update<T>(action: Action<T>, state: State): State; | ||
command<T, R>(action: Action<T>, state: State): Action<R>; | ||
view(e: Hoe, m: State, p: Params): VNode; | ||
} |
Sorry, the diff of this file is not supported yet
121943
43