We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0813090 commit 360a00dCopy full SHA for 360a00d
modules/mixins/ActiveState.js
@@ -3,6 +3,20 @@ var React = require('react');
3
/**
4
* A mixin for components that need to know the routes, URL
5
* params and query that are currently active.
6
+ *
7
+ * Example:
8
9
+ * var AboutLink = React.createClass({
10
+ * mixins: [ Router.ActiveState ],
11
+ * render: function () {
12
+ * var className = this.props.className;
13
14
+ * if (this.isActive('about'))
15
+ * className += ' is-active';
16
17
+ * return React.DOM.a({ className: className }, this.props.children);
18
+ * }
19
+ * });
20
*/
21
var ActiveState = {
22
0 commit comments