Apply suggestions from code review

Co-authored-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Patrik Oldsberg
2021-02-25 19:08:04 +01:00
committed by GitHub
parent 40c0fdbaa0
commit 243dd5771b
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -321,7 +321,7 @@ app, allowing it to be used as a switch for whether a particular link should be
displayed or action should be taken.
When calling `useRouteRef` with an optional external route, its return signature
is change to `RouteFunc | undefined`, allowing for logic like this:
is changed to `RouteFunc | undefined`, allowing for logic like this:
```tsx
const MyComponent = () => {
+1 -1
View File
@@ -96,7 +96,7 @@ type ExtractKeysWithType<Obj extends { [key in string]: any }, Type> = {
}[keyof Obj];
/**
* Given a map of boolean values denoting whether a rout is optional, create a
* Given a map of boolean values denoting whether a route is optional, create a
* map of needed RouteRefs.
*
* For example { foo: false, bar: true } gives { foo: RouteRef<any>, bar?: RouteRef<any> }
+1 -1
View File
@@ -83,7 +83,7 @@ export type ExternalRouteRefOptions<Optional extends boolean = false> = {
* Whether or not this route is optional, defaults to false.
*
* Optional external routes are not required to be bound in the app, and
* if aren't, `useRouteRef` will return `undefined`.
* if they aren't, `useRouteRef` will return `undefined`.
*/
optional?: Optional;
};