Skip to content

Commit 6391c8d

Browse files
author
Sergio Daniel Xalambrí
committed
[update] fix typos and improve docs
1 parent b6490e8 commit 6391c8d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ render(
2525
document.body,
2626
);
2727
```
28-
* `URLProvider` is a High-Order Components
28+
* `URLProvider` is a High-Order Component.
2929
* `URLProvider` expect only one property named `urls`.
3030
* `urls` should be an object where the keys are the URLs names and the values are the unparsed url using the sintax of Express.js.
3131

@@ -45,9 +45,10 @@ class UserData extends Component { ... }
4545

4646
export default UserData;
4747
```
48-
* The `connectURL` it's optional.
48+
* The `connectURL` argument (`mapURLToProps`) it's optional.
4949
* If you don't supply it then it will add the `getURL` function as a property.
5050
* The `mapURLToProps` function will receive the `getURL` function and `props` object as parameter and should return an object.
51+
* The `getURL` function receive the URL name and an objet with the parameters to use in it and return the parsed URL.
5152
* You can use it as a decorator (like the example above) or just as a function and send them the component to connect.
5253

5354
### parser
@@ -62,6 +63,6 @@ const profileURL = parser(urls, 'profile', {
6263
username: 'sergiodxa',
6364
});
6465
```
65-
* This is a Low-Level API and this used internally for the `connectURL` decorator, it's not expected that you should use it.
66-
* `parser` receive as arguments the `urls` map, the url name and the options/parameters object.
66+
* This is a Low-Level API and is used internally for the `connectURL` decorator, it's not expected that you use it directly.
67+
* `parser` receive as arguments the `urls` map, the URL name and the options/parameters object.
6768
* It will return the final parsed url string.

0 commit comments

Comments
 (0)