Skip to content

Commit

Permalink
Use refs directly (assuming React 0.14)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Sep 24, 2015
1 parent 6a4f5ab commit c92a740
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Redux DevTools Log Monitor

The default monitor for [Redux DevTools](https://github.com/gaearon/redux-devtools).

**Note: this is a work-in-progress version for [Redux DevTools 3](https://github.com/gaearon/redux-devtools/pull/132), and will not work with stable devtools. It also requires React 0.14.**

![](http://i.imgur.com/J4GeW0M.gif)

### License
Expand Down
5 changes: 2 additions & 3 deletions src/LogMonitor.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { PropTypes, Component } from 'react';
import { findDOMNode } from 'react-dom';
import { connectMonitor } from 'redux-devtools';
import LogMonitorEntry from './LogMonitorEntry';
import LogMonitorButton from './LogMonitorButton';
Expand Down Expand Up @@ -71,7 +70,7 @@ class LogMonitor extends Component {
};

componentWillReceiveProps(nextProps) {
const node = findDOMNode(this.refs.elements);
const node = this.refs.elements;
if (!node) {
this.scrollDown = true;
} else if (
Expand All @@ -88,7 +87,7 @@ class LogMonitor extends Component {
}

componentDidUpdate() {
const node = findDOMNode(this.refs.elements);
const node = this.refs.elements;
if (!node) {
return;
}
Expand Down

0 comments on commit c92a740

Please sign in to comment.