Skip to content

Commit aaa4bbf

Browse files
authored
chore: document usage with expo (#242)
1 parent 480a1b1 commit aaa4bbf

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ React Native date & time picker component for iOS, Android and Windows.
3232

3333
- [React Native DateTimePicker](#react-native-datetimepicker)
3434
- [Table of Contents](#table-of-contents)
35+
- [Expo users notice](#expo-users-notice)
3536
- [Getting started](#getting-started)
3637
- [RN >= 0.60](#rn--060)
3738
- [RN < 0.60](#rn--060-1)
@@ -70,6 +71,10 @@ React Native date & time picker component for iOS, Android and Windows.
7071

7172
- Xcode >= 10
7273

74+
## Expo users notice
75+
76+
This module is part of Expo - [see docs](https://docs.expo.io/versions/latest/sdk/date-time-picker/). However, Expo SDK may not contain the latest version of the module and therefore, the newest features and bugfixes may not be available in Expo. Use the command `expo install @react-native-community/datetimepicker` (not `yarn` or `npm`) to install this module - Expo will automatically install the latest version compatible with your Expo SDK (which may _not_ be the latest version of the module available).
77+
7378
## Getting started
7479

7580
```bash
@@ -130,7 +135,7 @@ export const App = () => {
130135
setDate(currentDate);
131136
};
132137

133-
const showMode = currentMode => {
138+
const showMode = (currentMode) => {
134139
setShow(true);
135140
setMode(currentMode);
136141
};
@@ -375,7 +380,7 @@ On Android, open picker modals will update the selected date and/or time if the
375380

376381
```js
377382
// Before
378-
onChange = event => {};
383+
onChange = (event) => {};
379384
<DatePickerIOS onChange={this.onChange} />;
380385
```
381386

@@ -389,7 +394,7 @@ On Android, open picker modals will update the selected date and/or time if the
389394

390395
```js
391396
// Before
392-
setDate = date => {};
397+
setDate = (date) => {};
393398
<DatePickerIOS onDateChange={this.setDate} />;
394399
```
395400

0 commit comments

Comments
 (0)