Skip to content

Commit

Permalink
fix($locationKey): export function get locationKey for Link/NavLink
Browse files Browse the repository at this point in the history
  • Loading branch information
faceyspacey committed Jul 4, 2017
1 parent 689a9eb commit 2bc356a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/connectRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ export default (

_history = history
_scrollBehavior = scrollBehavior
_locationKey = locationKey
let _initialDispatch

_updateScroll = (performedByUser: boolean = true) => {
Expand Down Expand Up @@ -508,6 +509,7 @@ export default (
let _history
let _scrollBehavior
let _updateScroll
let _locationKey

export const push = (pathname: string) => _history.push(pathname)

Expand Down Expand Up @@ -541,3 +543,5 @@ export const history = () => _history
export const scrollBehavior = () => _scrollBehavior

export const updateScroll = () => _updateScroll && _updateScroll()

export const locationKey = () => _locationKey
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export {
nextPath,
history,
scrollBehavior,
updateScroll
updateScroll,
locationKey
} from './connectRoutes'

export const NOT_FOUND = '@@redux-first-router/NOT_FOUND'
Expand Down

0 comments on commit 2bc356a

Please sign in to comment.