From a0d162ff7d43907f4012c7a3f081f932011c64fb Mon Sep 17 00:00:00 2001 From: Thomas Roch Date: Thu, 9 Jul 2015 17:12:55 +0100 Subject: [PATCH] feat: add link initialState --- modules/link-factory.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/link-factory.js b/modules/link-factory.js index 49755a0..c1d3f0b 100644 --- a/modules/link-factory.js +++ b/modules/link-factory.js @@ -26,7 +26,7 @@ function linkFactory(router) { routeOptions: {} } - let getInitialState = (props) { + let initialState = (props) { return { active: router.isActive(props.routeName, props.routeParams, props.activeStrict) }; @@ -81,5 +81,5 @@ function linkFactory(router) { return element('a', {href, className, onClick}, [props.label]) } - return {propTypes, defaultProps, shouldUpdate, afterMount, beforeUnmout, render} + return {propTypes, defaultProps, initialState, shouldUpdate, afterMount, beforeUnmout, render} }