You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A basic pushstate router for React with support for asynchronous routing logic, built using [react-basic-hooks](https://github.com/spicydonuts/purescript-react-basic-hooks). I recommend [routing-duplex](https://github.com/natefaubion/purescript-routing-duplex) for easy parsing and printing and [wire](https://github.com/robertdp/purescript-wire) for easy reactive state.
3
+
A basic pushstate router for React with support for asynchronous routing logic, built using [react-basic-hooks](https://github.com/spicydonuts/purescript-react-basic-hooks). I recommend [routing-duplex](https://github.com/natefaubion/purescript-routing-duplex) for easy parsing and printing.
4
4
5
-
```purescript
6
-
makeRouter ::
7
-
forall route f.
8
-
Foldable f =>
9
-
PushStateInterface ->
10
-
{ parse :: String -> f route
11
-
, print :: route -> String
12
-
, onRoute :: route -> Router route Transitioning Resolved Unit
13
-
, onTransition :: Transition route -> Effect Unit
14
-
} ->
15
-
Effect
16
-
{ component :: JSX
17
-
, navigate :: route -> Effect Unit
18
-
, redirect :: route -> Effect Unit
19
-
}
20
-
```
21
-
22
-
For a basic example see [`examples/RoutingDuplex.purs`](https://github.com/robertdp/purescript-wire-react-router/blob/master/examples/RoutingDuplex.purs).
5
+
For a basic example see [here](https://github.com/robertdp/purescript-web-router-example/blob/master/examples/RoutingDuplex.purs).
0 commit comments