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
Copy file name to clipboardExpand all lines: Readme.md
+33-30
Original file line number
Diff line number
Diff line change
@@ -13,29 +13,29 @@ This package allows applications to retrieve the state from a react component an
13
13
14
14
## Installation
15
15
16
-
To install with npm use
16
+
To install with npm use
17
17
18
18
`npm install with-url-state --save`
19
19
20
-
To install with yarn use
20
+
To install with yarn use
21
21
22
22
`yarn add with-url-state`
23
23
24
24
## Usage
25
25
26
-
Check out the [demo](https://dean177.github.io/with-url-state/), the [example/](https://github.com/Dean177/with-url-state/tree/master/example) directory, or play with it in [CodeSandbox](https://codesandbox.io/s/21z35p6pjp).
26
+
Play with it in [CodeSandbox](https://codesandbox.io/s/18x4l87yx7) or check out the the [example/](https://github.com/Dean177/with-url-state/tree/master/example)
`with-url-state` automates the query parameter manipulations, simplifying URL sharing for search results, querying data or tracking a visible portion of a map.
122
124
123
125
The api provided is:
126
+
124
127
- based on [higer-order-components](https://reactjs.org/docs/higher-order-components.html) which makes it composable and testable
125
128
- has a render-prop alternative for convenience
126
-
- type-safe thanks to [Typescript](https://www.typescriptlang.org/)
129
+
- type-safe thanks to [Typescript](https://www.typescriptlang.org/)
127
130
- very similar to [Reacts built in state](https://reactjs.org/docs/state-and-lifecycle.html) apis, so converting a component which already manages state is usually as simple as replacing `setState` with `setUrlState`!
0 commit comments