Skip to content

Commit

Permalink
fix(release): Update docs and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Thram committed Jan 23, 2017
1 parent 81ae6f2 commit 1cab9cb
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 78 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,4 @@ crashlytics.properties
crashlytics-build.properties
fabric.properties
.idea/

# Ignore Example folder for now
examples
.DS_Store
77 changes: 76 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,77 @@
# react-thrux
Thrux implementation for React components

[![Travis build](https://img.shields.io/travis/Thram/react-thrux.svg?style=flat-square)](https://travis-ci.org/Thram/react-thrux)
[![version](https://img.shields.io/npm/v/react-thrux.svg?style=flat-square)](https://www.npmjs.com/package/react-thrux)
[![downloads](https://img.shields.io/npm/dm/react-thrux.svg?style=flat-square)](https://www.npmjs.com/package/react-thrux)
[![MIT License](https://img.shields.io/npm/l/react-thrux.svg?style=flat-square)](https://opensource.org/licenses/MIT)

Connect Thrux state to a React component.

## API

#### connect(stateKey, ReactComponent)

Register your dictionaries.

***returns:*** React Component[Object]

Param | Type | Description
----- | ---- | -----------
stateKey | String | Name of the state you want to connect your component with
ReactComponent | [Object] / [Class] | React Component object

```javascript
import React, {Component} from "react";
import {dispatch} from "thrux";
import {connect} from "react-thrux";


class Example extends Component {
state = {
counter: 0
};

onIncrease = () => dispatch('counter:INCREASE');
onDecrease = () => dispatch('counter:DECREASE');
onReset = () => dispatch('counter:RESET');

render() {
return (
<div style={styles.container}>
<div style={styles.column}>
<div id="click-area" style={styles.clickArea} onClick={this.onIncrease}>
Click Area
</div>
<button id="decrease" onClick={this.onDecrease}>Decrease</button>
<button id="reset" onClick={this.onReset}>Reset</button>
</div>
<div style={styles.column}>
Clicks: <span>{this.state.counter}</span>
</div>
</div>
)
}
}

const styles = {
container: {
fontFamily: "Helvetica, Arial, sans-serif"
},

clickArea: {
padding : '20px',
width : '200px',
height : '200px',
border : '1px solid black',
background: 'teal'
},
column : {
padding: '20px',
display: 'inline-block',
float : 'left'
}
};

export default connect('counter', Example);

```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"homepage": "https://github.com/Thram/react-thrux#readme",
"dependencies": {
"thrux": "^2.1.3"
"thrux": "^2.1.4"
},
"devDependencies": {
"babel-cli": "^6.22.2",
Expand Down
88 changes: 15 additions & 73 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -274,15 +274,6 @@ babel-helper-builder-binary-assignment-operator-visitor@^6.22.0:
babel-runtime "^6.22.0"
babel-types "^6.22.0"

babel-helper-builder-react-jsx@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.22.0.tgz#aafb31913e47761fd4d0b6987756a144a65fca0d"
dependencies:
babel-runtime "^6.22.0"
babel-types "^6.22.0"
esutils "^2.0.0"
lodash "^4.2.0"

babel-helper-call-delegate@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.22.0.tgz#119921b56120f17e9dae3f74b4f5cc7bcc1b37ef"
Expand Down Expand Up @@ -451,14 +442,6 @@ babel-plugin-syntax-exponentiation-operator@^6.8.0:
version "6.13.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de"

babel-plugin-syntax-flow@^6.18.0, babel-plugin-syntax-flow@^6.3.13:
version "6.18.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d"

babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0:
version "6.18.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946"

babel-plugin-syntax-object-rest-spread@^6.8.0:
version "6.13.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5"
Expand Down Expand Up @@ -678,48 +661,13 @@ babel-plugin-transform-exponentiation-operator@^6.22.0:
babel-plugin-syntax-exponentiation-operator "^6.8.0"
babel-runtime "^6.22.0"

babel-plugin-transform-flow-strip-types@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf"
dependencies:
babel-plugin-syntax-flow "^6.18.0"
babel-runtime "^6.22.0"

babel-plugin-transform-object-rest-spread@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.22.0.tgz#1d419b55e68d2e4f64a5ff3373bd67d73c8e83bc"
dependencies:
babel-plugin-syntax-object-rest-spread "^6.8.0"
babel-runtime "^6.22.0"

babel-plugin-transform-react-display-name@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.22.0.tgz#077197520fa8562b8d3da4c3c4b0b1bdd7853f26"
dependencies:
babel-runtime "^6.22.0"

babel-plugin-transform-react-jsx-self@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz#df6d80a9da2612a121e6ddd7558bcbecf06e636e"
dependencies:
babel-plugin-syntax-jsx "^6.8.0"
babel-runtime "^6.22.0"

babel-plugin-transform-react-jsx-source@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz#66ac12153f5cd2d17b3c19268f4bf0197f44ecd6"
dependencies:
babel-plugin-syntax-jsx "^6.8.0"
babel-runtime "^6.22.0"

babel-plugin-transform-react-jsx@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.22.0.tgz#48556b7dd4c3fe97d1c943bcd54fc3f2561c1817"
dependencies:
babel-helper-builder-react-jsx "^6.22.0"
babel-plugin-syntax-jsx "^6.8.0"
babel-runtime "^6.22.0"

babel-plugin-transform-regenerator@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.22.0.tgz#65740593a319c44522157538d690b84094617ea6"
Expand Down Expand Up @@ -776,18 +724,6 @@ babel-preset-jest@^18.0.0:
dependencies:
babel-plugin-jest-hoist "^18.0.0"

babel-preset-react@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-preset-react/-/babel-preset-react-6.22.0.tgz#7bc97e2d73eec4b980fb6b4e4e0884e81ccdc165"
dependencies:
babel-plugin-syntax-flow "^6.3.13"
babel-plugin-syntax-jsx "^6.3.13"
babel-plugin-transform-flow-strip-types "^6.22.0"
babel-plugin-transform-react-display-name "^6.22.0"
babel-plugin-transform-react-jsx "^6.22.0"
babel-plugin-transform-react-jsx-self "^6.22.0"
babel-plugin-transform-react-jsx-source "^6.22.0"

babel-preset-stage-2@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-preset-stage-2/-/babel-preset-stage-2-6.22.0.tgz#ccd565f19c245cade394b21216df704a73b27c07"
Expand Down Expand Up @@ -1286,8 +1222,8 @@ error-ex@^1.2.0:
is-arrayish "^0.2.1"

es-abstract@^1.4.3:
version "1.6.1"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.6.1.tgz#bb8a2064120abcf928a086ea3d9043114285ec99"
version "1.7.0"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.7.0.tgz#dfade774e01bfcd97f96180298c449c8623fb94c"
dependencies:
es-to-primitive "^1.1.1"
function-bind "^1.1.0"
Expand All @@ -1306,7 +1242,7 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"

esutils@^2.0.0, esutils@^2.0.2:
esutils@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"

Expand Down Expand Up @@ -1590,8 +1526,8 @@ github-url-from-username-repo@^1.0.0:
resolved "https://registry.yarnpkg.com/github-url-from-username-repo/-/github-url-from-username-repo-1.0.2.tgz#7dd79330d2abe69c10c2cef79714c97215791dfa"

github@^8.0.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/github/-/github-8.1.0.tgz#532026bfc70b9e679125b39ba44729244f687119"
version "8.1.1"
resolved "https://registry.yarnpkg.com/github/-/github-8.1.1.tgz#a078c61669b4d4b588bf1b2e2a591eb7c49feb36"
dependencies:
follow-redirects "0.0.7"
https-proxy-agent "^1.0.0"
Expand Down Expand Up @@ -2440,7 +2376,13 @@ object.omit@^2.0.0:
for-own "^0.1.4"
is-extendable "^0.1.1"

once@^1.3.0, once@^1.3.3, once@~1.3.0, once@~1.3.3:
once@^1.3.0, once@^1.3.3:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
dependencies:
wrappy "1"

once@~1.3.0, once@~1.3.3:
version "1.3.3"
resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20"
dependencies:
Expand Down Expand Up @@ -3226,9 +3168,9 @@ through@2, through@^2.3.6, through@~2.3, through@~2.3.1:
version "2.3.8"
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"

thrux@^2.1.3:
version "2.1.3"
resolved "https://registry.yarnpkg.com/thrux/-/thrux-2.1.3.tgz#bbe3ce74c014cbb70b06ca7de4d89e0287aa9b93"
thrux@^2.1.4:
version "2.1.4"
resolved "https://registry.yarnpkg.com/thrux/-/thrux-2.1.4.tgz#a85dc90b4b1d46d5de4d923b91f2a8dd6883e457"
dependencies:
lodash "^4.17.4"

Expand Down

0 comments on commit 1cab9cb

Please sign in to comment.