Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

flux-router-component

Package Overview
Dependencies
Maintainers
4
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flux-router-component - npm Package Compare versions

Comparing version 0.2.2 to 0.3.0

10

lib/NavLink.js

@@ -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:

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc