Skip to content

Commit

Permalink
[docs] Add Router API reference
Browse files Browse the repository at this point in the history
  • Loading branch information
amandeepmittal committed May 16, 2024
1 parent 8bcbcca commit a8bd55b
Show file tree
Hide file tree
Showing 17 changed files with 491 additions and 58 deletions.
32 changes: 30 additions & 2 deletions docs/pages/versions/unversioned/sdk/router.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,40 @@ platforms: ['android', 'ios', 'web']

import APISection from '~/components/plugins/APISection';
import { APIInstallSection } from '~/components/plugins/InstallSection';
import { SnackInline } from '~/ui/components/Snippet';
import { ConfigPluginExample } from '~/components/plugins/ConfigSection';

`expo-router` is a routing library for React Native and web apps. It enables navigation management using a file-based routing system. It provides native navigation components and is built on top of [React Navigation](https://reactnavigation.org/).

## Installation

<APIInstallSection packageName="expo-router" />
<APIInstallSection packageName="expo-router" hideBareInstructions />

## Configuration in app.json/app.config.js

If you are using the default template to create a new project, `expo-router` [config plugin](/config-plugins/introduction/) is configured in the app config.

<ConfigPluginExample>

```json app.json
{
"expo": {
"plugins": ["expo-router"]
}
}
```

</ConfigPluginExample>

## Usage

{/* TODO:(@aman) To update the following once https://github.com/expo/expo/pull/28804 is merged which offers instructions for basic usage. */}

Find more information and guides about using `expo-router` in [Expo Router](/router/introduction/) section.

## API

```js
import { Stack, Tabs, Link } from 'expo-router';
```

<APISection packageName="expo-router" />
2 changes: 1 addition & 1 deletion docs/public/static/data/unversioned/expo-router.json

Large diffs are not rendered by default.

97 changes: 86 additions & 11 deletions packages/expo-router/build/hooks.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/expo-router/build/hooks.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

97 changes: 86 additions & 11 deletions packages/expo-router/build/hooks.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a8bd55b

Please sign in to comment.