flux-router-component
Advanced tools
Comparing version 0.2.2 to 0.3.0
@@ -13,2 +13,5 @@ /** | ||
NavLink = React.createClass({ | ||
propTypes: { | ||
context: React.PropTypes.object.isRequired | ||
}, | ||
dispatchNavAction: function (e) { | ||
@@ -29,5 +32,6 @@ var context = this.props.context; | ||
render: function() { | ||
var context = this.props.context; | ||
if (!this.props.href && this.props.name && context && context.makePath) { | ||
this.props.href = context.makePath(this.props.name, this.props.navParams); | ||
var context = this.props.context, | ||
routeName = this.props.routeName; | ||
if (!this.props.href && routeName && context && context.makePath) { | ||
this.props.href = context.makePath(routeName, this.props.navParams); | ||
} | ||
@@ -34,0 +38,0 @@ return this.transferPropsTo( |
{ | ||
"name": "flux-router-component", | ||
"version": "0.2.2", | ||
"version": "0.3.0", | ||
"description": "Router-related React component and mixin for applications with Flux architecture", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -8,2 +8,3 @@ # flux-router-component [![Build Status](https://travis-ci.org/yahoo/flux-router-component.svg?branch=master)](https://travis-ci.org/yahoo/flux-router-component) [![Dependency Status](https://david-dm.org/yahoo/flux-router-component.svg)](https://david-dm.org/yahoo/flux-router-component) [![Coverage Status](https://coveralls.io/repos/yahoo/flux-router-component/badge.png?branch=master)](https://coveralls.io/r/yahoo/flux-router-component?branch=master) | ||
### Example Usage | ||
Example of using `NavLink` with `href` property defined: | ||
```js | ||
@@ -48,2 +49,4 @@ var NavLink = require('flux-router-component').NavLink; | ||
We also have another more sophisticated example application, [routing](https://github.com/yahoo/flux-examples/tree/master/routing), that uses `NavLink` with `routeName` property defined. | ||
## RouterMixin | ||
@@ -50,0 +53,0 @@ `RouterMixin` is a React mixin to be used by application's top level React component to: |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
276
89
17254
12