Skip to content

Commit d191ea1

Browse files
committed
break out advanced guides
1 parent 7c6ff7d commit d191ea1

File tree

8 files changed

+124
-21
lines changed

8 files changed

+124
-21
lines changed

docs/advanced-guides/README.md

Lines changed: 79 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,98 @@ build a certain capability or feature of your app with React Router.
55

66
## Building the User Interface
77

8-
- [Using Layouts](#TODO)
9-
- ["Not Found" Routes (404)](#TODO)
10-
- [Using Route Config Objects](#TODO)
8+
- [Using Layouts](#layouts)
9+
- ["Not Found" Routes (404)](#not-found)
10+
- [Using Route Config Objects](#route-configs)
11+
12+
<a name="layouts"></a>
13+
14+
### Using Layouts
15+
16+
TODO
17+
18+
<a name="not-found"></a>
19+
20+
### "Not Found" Routes (404)
21+
22+
TODO
23+
24+
<a name="route-configs"></a>
25+
26+
### Using Route Config Objects
27+
28+
TODO
1129

1230
## Common User Flows
1331

14-
- [Login and Authentication](#TODO)
15-
- [Forms and Prompts](#TODO)
16-
- [Transitions and Animation](#TODO)
17-
- [Passing Data Between Routes Using `location.state`](#TODO)
18-
- [Persisting Data Using `location.key`](#TODO)
19-
- [Managing Scroll Position](#TODO)
20-
- [Modals](#TODO)
32+
- [Login and Authentication](#login-and-auth)
33+
- [Forms and Prompts](#forms-and-prompts)
34+
- [Transitions and Animation](#animation)
35+
- [Passing Data Between Routes Using `location.state`](#passing-data-with-state)
36+
- [Persisting Data Using `location.key`](#persisting-data-with-key)
37+
- [Managing Scroll Position](#scroll-position)
38+
- [Modals](#modals)
39+
40+
<a name="login-and-auth"></a>
41+
42+
### Login and Authentication
43+
44+
TODO
45+
46+
<a name="forms-and-prompts"></a>
47+
48+
### Forms and Prompts
49+
50+
TODO
51+
52+
<a name="animation"></a>
53+
54+
### Transitions and Animation
55+
56+
TODO
57+
58+
<a name="passing-data-with-state"></a>
59+
60+
### Passing Data Between Routes Using `location.state`
61+
62+
TODO
63+
64+
<a name="persisting-data-with-key"></a>
65+
66+
### Persisting Data Using `location.key`
67+
68+
TODO
69+
70+
<a name="scroll-position"></a>
71+
72+
### Managing Scroll Position
73+
74+
TODO
75+
76+
<a name="modals"></a>
77+
78+
### Modals
79+
80+
TODO
2181

2282
## Useful Techniques
2383

2484
- [Working with the Search/Query String](working-with-the-search-string.md)
25-
- [Custom Links](#TODO)
26-
- [Recursive Paths](#TODO)
27-
- [Code Splitting](#TODO)
85+
- [Custom Links](custom-links.md)
86+
- [Recursive Paths](recursive-paths.md)
87+
- [Code Splitting](code-splitting.md)
2888

2989
## Server Rendering
3090

31-
- [Creating Routes from Files](#TODO)
32-
- [Using `StaticRouter` Directly](#TODO)
91+
- [Creating Routes from Files](server-rendering/creating-routes-from-files.md)
92+
- [Using `StaticRouter` Directly](server-rendering/using-staticrouter-directly.md)
3393

3494
## Testing
3595

36-
- [Using Jest with React Test Renderer](#TODO)
37-
- [Using Jest with React Testing Library](#TODO)
38-
- [Using Mocha](#TODO)
39-
- [Using Cypress](#TODO)
96+
- [Using Jest with React Test Renderer](testing/testing-with-react-test-renderer.md)
97+
- [Using Jest with React Testing Library](testing/testing-with-react-testing-library.md)
98+
- [Using Mocha](testing/testing-with-mocha.md)
99+
- [Using Cypress](testing/testing-with-cypress.md)
40100

41101
This list is by no means exhaustive, so if you think something is missing,
42102
please [let us know](#TODO)!
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Code Splitting
2+
3+
TODO

docs/advanced-guides/custom-links.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Custom Links
2+
3+
TODO
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Recursive Paths
2+
3+
TODO
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Creating Routes from Files
2+
3+
TODO
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Using `StaticRouter` Directly
2+
3+
TODO
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Testing With Cypress
2+
3+
## Getting Setup
4+
5+
TODO
6+
7+
## Testing Routes
8+
9+
TODO
10+
11+
## Testing Links and Navigation
12+
13+
TODO

docs/api-reference.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,20 @@ interface LinkProps extends TouchableHighlightProps {
329329

330330
A `<Link>` is an element that lets the user navigate to another view by tapping it, similar to how `<a>` elements work in a web app. In `react-router-native`, a `<Link>` renders a `TouchableHighlight`.
331331

332-
TODO: example
332+
```tsx
333+
import React from "react";
334+
import { View, Text } from "react-native";
335+
import { Link } from "react-router-native";
336+
337+
function Home() {
338+
return (
339+
<View>
340+
<Text>Welcome!</Text>
341+
<Link to="/profile">Visit your profile</Link>
342+
</View>
343+
);
344+
}
345+
```
333346

334347
<a name="navlink"></a>
335348

@@ -421,7 +434,9 @@ const NavLink = React.forwardRef(
421434
If the `end` prop is used, it will ensure this component isn't matched as "active" when its descendant paths are matched:
422435

423436
```tsx
424-
<NavLink to="/" end>Home</NavLink>
437+
<NavLink to="/" end>
438+
Home
439+
</NavLink>
425440
```
426441

427442
<a name="navigate"></a>

0 commit comments

Comments
 (0)