Skip to content

Commit

Permalink
react/lib/cx has been deprecated (https://facebook.github.io/react/do…
Browse files Browse the repository at this point in the history
…cs/class-name-manipulation.html). Using JedWatson/classnames.
  • Loading branch information
gajus committed Jul 29, 2015
1 parent ac92a45 commit 58d30a6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/flux-chat/js/components/ThreadListItem.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

var ChatThreadActionCreators = require('../actions/ChatThreadActionCreators');
var React = require('react');
var cx = require('react/lib/cx');
var classNames = require('classnames');

var ReactPropTypes = React.PropTypes;

Expand All @@ -28,7 +28,7 @@ var ThreadListItem = React.createClass({
var lastMessage = thread.lastMessage;
return (
<li
className={cx({
className={classNames({
'thread-list-item': true,
'active': thread.id === this.props.currentThreadID
})}
Expand Down
1 change: 1 addition & 0 deletions examples/flux-chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"repository": "https://github.com/facebook/flux",
"main": "js/app.js",
"dependencies": {
"classnames": "^2.1.3",
"flux": "^2.0.0",
"keymirror": "~0.1.0",
"object-assign": "^1.0.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/flux-todomvc/js/components/TodoItem.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var ReactPropTypes = React.PropTypes;
var TodoActions = require('../actions/TodoActions');
var TodoTextInput = require('./TodoTextInput.react');

var cx = require('react/lib/cx');
var classNames = require('classnames');

var TodoItem = React.createClass({

Expand Down Expand Up @@ -49,7 +49,7 @@ var TodoItem = React.createClass({
// in the naming of view actions toggleComplete() vs. destroyCompleted().
return (
<li
className={cx({
className={classNames({
'completed': todo.complete,
'editing': this.state.isEditing
})}
Expand Down
1 change: 1 addition & 0 deletions examples/flux-todomvc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"repository": "https://github.com/facebook/flux",
"main": "js/app.js",
"dependencies": {
"classnames": "^2.1.3",
"flux": "^2.0.1",
"keymirror": "~0.1.0",
"object-assign": "^1.0.0",
Expand Down

0 comments on commit 58d30a6

Please sign in to comment.