Skip to content

Commit 8f1e1c2

Browse files
committed
Add route
1 parent effdca1 commit 8f1e1c2

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/Next/Router.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ export function _off(event) {
2020
export const query = (router) => router.query
2121

2222
export const push = (router) => (route) => () => router.push(route)
23+
24+
export const route = (router) => router.route

src/Next/Router.purs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ foreign import query :: forall q. Router -> q
1818

1919
foreign import push :: Router -> String -> Effect Unit
2020

21+
foreign import route :: Router -> String
22+
2123
foreign import _on :: forall a. String -> a -> Effect Unit
2224

2325
foreign import _off :: forall a. String -> a -> Effect Unit

0 commit comments

Comments
 (0)