Skip to content

Commit

Permalink
chore(MountNode): use componentDidMount() (#3300)
Browse files Browse the repository at this point in the history
* chore(MountNode): use componentDidMount()

* fix broken test
  • Loading branch information
layershifter authored Nov 25, 2018
1 parent e6584ff commit 9acbe90
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/addons/MountNode/MountNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default class MountNode extends Component {
return nextClassName !== currentClassName
}

componentWillMount() {
componentDidMount() {
const node = getNodeFromProps(this.props)

if (node) {
Expand Down
2 changes: 1 addition & 1 deletion test/specs/addons/MountNode/MountNode-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('MountNode', () => {
describe('node', () => {
it('will add className to specified node', () => {
const node = document.createElement('div')
shallow(<MountNode className='foo' node={node} />)
mount(<MountNode className='foo' node={node} />)

node.classList.contains('foo').should.be.equal(true)
})
Expand Down

0 comments on commit 9acbe90

Please sign in to comment.