From f3f881a91c6cca917cbd9c190583fe537159fa6e Mon Sep 17 00:00:00 2001 From: Doug Wade Date: Tue, 16 Aug 2016 21:04:59 -0700 Subject: [PATCH] Add support to Link for href --- packages/react-server/core/components/Link.jsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/react-server/core/components/Link.jsx b/packages/react-server/core/components/Link.jsx index baa7e9657..b27f99181 100644 --- a/packages/react-server/core/components/Link.jsx +++ b/packages/react-server/core/components/Link.jsx @@ -6,7 +6,8 @@ module.exports = React.createClass({ displayName: 'Link', propTypes: { - path : React.PropTypes.string.isRequired, + path : React.PropTypes.string, + href : React.PropTypes.string, bundleData : React.PropTypes.bool, frameback : React.PropTypes.bool, reuseDom : React.PropTypes.bool, @@ -24,7 +25,7 @@ module.exports = React.createClass({ render: function () { return ( - {this.props.children} + {this.props.children} ); }, @@ -37,7 +38,7 @@ module.exports = React.createClass({ e.preventDefault(); e.stopPropagation(); const {bundleData, frameback, reuseDom, reuseFrame} = this.props; - navigateTo(this.props.path, { + navigateTo(this.props.path || this.props.href, { bundleData, frameback, reuseDom,