Skip to content

Commit 8022c83

Browse files
committed
doc: Fix indentation
1 parent 41ce764 commit 8022c83

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

README.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ npm install --save react-with-params
1313

1414
## Usage
1515
```typescript
16-
import {withParams} from 'react-with-params'
16+
import {withParams} from 'react-with-params'
1717

18-
const ShowName = withParams('name', {match: '/user/:name'})(({name}) =>
19-
<span>{name}</span>
20-
)
21-
22-
<Route exact path='/user/:name' component={ShowName} />
18+
const ShowName = withParams('name', {match: '/user/:name'})(({name}) =>
19+
<span>{name}</span>
20+
)
21+
22+
<Route exact path='/user/:name' component={ShowName} />
2323
```
2424

2525
```typescript
26-
import {withParams} from 'react-with-params'
26+
import {withParams} from 'react-with-params'
27+
28+
const ShowNameAndId = withParams(['name', 'id'], {match: '/user/:name/:id'})(({name, id}) =>
29+
<span>{id} - {name}</span>
30+
)
2731

28-
const ShowNameAndId = withParams(['name', 'id'], {match: '/user/:name/:id'})(({name, id}) =>
29-
<span>{id} - {name}</span>
30-
)
31-
32-
<Route exact path='/user/:name/:id' component={ShowNameAndId} />
32+
<Route exact path='/user/:name/:id' component={ShowNameAndId} />
3333
```
3434

3535
## License

0 commit comments

Comments
 (0)