From e214932807635d0b473c3f71de9c32bc50826cb6 Mon Sep 17 00:00:00 2001 From: Matteo Mazzarolo Date: Wed, 22 Feb 2017 20:17:27 +0100 Subject: [PATCH] Update README.md --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index be6ce14..0bea81a 100644 --- a/README.md +++ b/README.md @@ -18,23 +18,23 @@ This library is available on npm, install it with: `npm install --save react-nat ## Usage ```javascript -import React, { Component } from 'react' -import { Text, TouchableOpacity, View } from 'react-native' -import DateTimePicker from 'react-native-modal-datetime-picker' +import React, { Component } from 'react'; +import { Text, TouchableOpacity, View } from 'react-native'; +import DateTimePicker from 'react-native-modal-datetime-picker'; export default class DateTimePickerTester extends Component { state = { - isDateTimePickerVisible: false - } + isDateTimePickerVisible: false, + }; - _showDateTimePicker = () => this.setState({ isDateTimePickerVisible: true }) + _showDateTimePicker = () => this.setState({ isDateTimePickerVisible: true }); - _hideDateTimePicker = () => this.setState({ isDateTimePickerVisible: false }) + _hideDateTimePicker = () => this.setState({ isDateTimePickerVisible: false }); _handleDatePicked = (date) => { - console.log('A date has been picked: ', date) - this._hideDateTimePicker() - } + console.log('A date has been picked: ', date); + this._hideDateTimePicker(); + }; render () { return ( @@ -48,7 +48,7 @@ export default class DateTimePickerTester extends Component { onCancel={this._hideDateTimePicker} /> - ) + ); } }