Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit d056173

Browse files
committed
Merge pull request #21 from dfournier/fix-readme
Fix specific import examples in the README
2 parents 12e3bfe + a632650 commit d056173

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Initially they were part of the [React-Bootstrap](https://github.com/react-boots
99

1010
All validators can be imported as
1111
```js
12-
import elementType from 'react-prop-types/elementType';
12+
import elementType from 'react-prop-types/lib/elementType';
1313
// or
1414
import { elementType } from 'react-prop-types';
1515
...
@@ -26,7 +26,7 @@ propTypes: {
2626
2727
If you use `webpack` and only want to bundle the validators you need, prefer the following approach:
2828
```js
29-
import elementType from 'react-prop-types/elementType'
29+
import elementType from 'react-prop-types/lib/elementType'
3030
```
3131
3232
---
@@ -222,7 +222,7 @@ But this should throw the `only one of the following may be provided` error
222222
223223
The possible solution
224224
```js
225-
import { singlePropFrom } from 'react-prop-types/singlePropFrom';
225+
import singlePropFrom from 'react-prop-types/lib/singlePropFrom';
226226

227227
const typeList = [React.PropTypes.number, React.PropTypes.string];
228228

0 commit comments

Comments
 (0)