Skip to content

Commit 6ef5701

Browse files
committed
Updated README
1 parent fcc6f19 commit 6ef5701

File tree

1 file changed

+10
-26
lines changed

1 file changed

+10
-26
lines changed

README.md

+10-26
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,30 @@
1-
# purescript-wire-react-router
1+
# purescript-web-router
22

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 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.
44

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).
236

247
## How to use with Spago
258

26-
Add `wire-react-router` to your `packages.dhall`:
9+
Add `web-router` to your `packages.dhall`:
2710

2811
```dhall
2912
let additions =
30-
{ wire-react-router =
13+
{ web-router =
3114
{ dependencies =
3215
[ "aff"
16+
, "effect"
3317
, "freet"
3418
, "indexed-monad"
19+
, "prelude"
3520
, "profunctor-lenses"
36-
, "react-basic-hooks"
3721
, "routing"
3822
]
39-
, repo = "https://github.com/robertdp/purescript-wire-react-router.git"
40-
, version = "v0.2.1"
23+
, repo = "https://github.com/robertdp/purescript-web-router.git"
24+
, version = "v0.3.0"
4125
}
4226
}
4327
```
4428

4529
And then install with
46-
`$ spago install wire-react-router`
30+
`$ spago install web-router`

0 commit comments

Comments
 (0)