Closed kaesonho closed 9 years ago
updated, now provide a function for users to overwrite attributes and create a NavLink component
updated, still listen to the RouteStore change.
CLA is valid!
lgtm
thanks :fireworks:, squashed
:+1:
do we want to put createNavLink
in lib
? or addons
?
Keep it in lib
since it's used by core. We can export it from require('fluxible-router').createNavLinkComponent
.
updated, change file name as createNavLinkComponent
, also export it with index.js
:+1:
:boat:
rebased, let me merge it
:+1:
Higher order component pattern is good but since users might use
NavLink
everywhere, so havingconnectToStore -> handleRoute -> NavLink -> a
should be too much and the performance might be able to be improved.makePath
andisActive
from routeStore, use it directly, so that we can reduce two higher component and we can remove the eventListeners to the RouteStore. previously the RouteStore might propagate hundreds emitChange to every NavLink on the page.move out NavLink functions to beprovidenavLinkUtils
, so that if users have the use case they can compose there own NavLink.createNavLink
so that users can overwrite the attribute with whatever they want, maybe add a mixin or a custom click event handler@mridgway @redonkulus @lingyan @Vijar