From acb6395370df14c5353663d730cf7439bc1a1977 Mon Sep 17 00:00:00 2001 From: David Konsumer Date: Mon, 3 Dec 2018 15:57:06 -0800 Subject: [PATCH] Pass history to PushStateLocation This allows programatic history modification like `history.push('/')` in `` handler function --- src/lib/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/index.js b/src/lib/index.js index b3f2cf0..7f4fc61 100644 --- a/src/lib/index.js +++ b/src/lib/index.js @@ -70,11 +70,11 @@ class PushStateAnchor extends Component { const PushStateLocation = (props) => - {value => value.location && props.children(value.location)} + {value => value.location && props.children(value.location, value.hiistory)} export { PushStateAnchorProvider, PushStateAnchor, PushStateLocation -} \ No newline at end of file +}