Skip to content

Commit

Permalink
use componentDidMount instead of componentWillMount
Browse files Browse the repository at this point in the history
  • Loading branch information
lipp committed Jan 12, 2017
1 parent 2afffe3 commit 0c8e470
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const withJet = (mapStateToConnection, fetchers = {}) => {
}
}

componentWillMount () {
componentDidMount () {
this.fetchAll(this.props.connection)
}

Expand Down
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ describe('withJet', () => {
type: 'SET_CONNECTION',
connection: {url: 'ws://localhost:1999', user: 'admin', password: '333'}
})
} else if (user === 'admin' && state.admin && !once) {
} else if (user === 'admin' && state.admin && state.foo && !once) {
assert.equal(state.admin, 'secret')
assert.equal(wrapper.find('h1').text(), 'secret123')
assert(wasJohn)
Expand Down

0 comments on commit 0c8e470

Please sign in to comment.