Skip to content

Commit

Permalink
Remove createRoutesFromArray (#8464)
Browse files Browse the repository at this point in the history
Co-authored-by: hanquliu <[email protected]>
  • Loading branch information
liuhanqu and hanquliu authored Dec 13, 2021
1 parent 8e3fdb5 commit e9bea61
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -774,36 +774,6 @@ function requestHandler(req, res) {
http.createServer(requestHandler).listen(3000);
```

### `createRoutesFromArray`

<details>
<summary>Type declaration</summary>

```tsx
declare function createRoutesFromArray(
array: PartialRouteObject[]
): RouteObject[];

interface PartialRouteObject {
path?: string;
caseSensitive?: boolean;
element?: React.ReactNode;
children?: PartialRouteObject[];
}

interface RouteObject {
caseSensitive: boolean;
children?: RouteObject[];
element: React.ReactNode;
path: string;
}
```

</details>

`createRoutesFromArray` is a helper that fills in the (potentially) missing pieces in an array of route objects. It is used internally by [`useRoutes`](#useroutes) to create route objects.
<a name="createroutesfromchildren"></a>

### `createRoutesFromChildren`

<details>
Expand Down Expand Up @@ -1330,8 +1300,6 @@ function App() {
}
```

See also [`createRoutesFromArray`](#createroutesfromarray).

### `useSearchParams`

> **Note:**
Expand Down

0 comments on commit e9bea61

Please sign in to comment.