Skip to content

Commit

Permalink
remove context and updated package
Browse files Browse the repository at this point in the history
  • Loading branch information
yeojz committed May 13, 2017
1 parent 4f5f5cd commit 74680f5
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 70 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ For examples, check out the [React Component State](https://github.com/yeojz/rea
- [Input](https://yeojz.github.io/react-form-addons#formControl) (via formControl)
- [Textarea](https://yeojz.github.io/react-form-addons#formControl) (via formControl)

#### experimental

- withContext

## Installation

Install the library:
Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
"!**/node_modules/**",
"!**/vendor/**"
],
"setupFiles": [
]
"setupFiles": []
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -85,7 +84,6 @@
"dependencies": {
"immutability-helper": "^2.1.1",
"invariant": "^2.2.2",
"lodash": "^4.0.0",
"prop-types": "^15.5.4"
"lodash": "^4.0.0"
}
}
1 change: 0 additions & 1 deletion src/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export constants from './constants';
export formControl from './formControl';
export list from './list';
export SyntheticFormEvent from '../utils/SyntheticFormEvent';
export withContext from './withContext';
export withProps from './withProps';
export withSideEffects from './withSideEffects';
export withState from './withState';
Expand Down
3 changes: 1 addition & 2 deletions src/lib/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as exposed from './index';

describe('lib/index', function () {
it('total number of exports', function () {
expect(Object.keys(exposed)).toHaveLength(12)
expect(Object.keys(exposed)).toHaveLength(11)
});

[
Expand All @@ -13,7 +13,6 @@ describe('lib/index', function () {
['constants', 'object'],
['formControl', 'function'],
['list', 'function'],
['withContext', 'function'],
['withSideEffects', 'function'],
['withState', 'function'],
['withValidation', 'function']
Expand Down
40 changes: 0 additions & 40 deletions src/lib/withContext.js

This file was deleted.

12 changes: 0 additions & 12 deletions src/lib/withContext.spec.js

This file was deleted.

4 changes: 2 additions & 2 deletions src/lib/withSideEffects.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ const applySideEffects = (sideEffects: SideEffects, evt: SyntheticFormEvent, pro
)
);

const handleChange = (sideEffects: SideEffects) => (props: Props) => (evt: PseudoEvent): Promise<any> => {
const handleChange = (sideEffects: SideEffects) => (props: Props) => (evt: PseudoEvent): void => {
let event = createSyntheticFormEvent(evt);

return applySideEffects(sideEffects, event, props)
applySideEffects(sideEffects, event, props)
.then((event) => props.onChange(event))
.catch((err) => props.onError(err, constants.SIDE_EFFECTS_ERROR));
};
Expand Down
6 changes: 1 addition & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1811,14 +1811,10 @@ http-signature@~1.1.0:
jsprim "^1.2.2"
sshpk "^1.7.0"

iconv-lite@0.4.13:
iconv-lite@0.4.13, iconv-lite@~0.4.13:
version "0.4.13"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2"

iconv-lite@~0.4.13:
version "0.4.17"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.17.tgz#4fdaa3b38acbc2c031b045d0edcdfe1ecab18c8d"

ignore@^3.2.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.0.tgz#3812d22cbe9125f2c2b4915755a1b8abd745a001"
Expand Down

0 comments on commit 74680f5

Please sign in to comment.