diff --git a/releases/next/docs/actionsheetios.html b/releases/next/docs/actionsheetios.html index 5b873ff4656..6d621f24105 100644 --- a/releases/next/docs/actionsheetios.html +++ b/releases/next/docs/actionsheetios.html @@ -25,12 +25,10 @@ In this way, you can share images, videos, PDF files, etc.

var DESTRUCTIVE_INDEX = 3; var CANCEL_INDEX = 4; -var ActionSheetExample = React.createClass({ - getInitialState() { - return { - clicked: 'none', - }; - }, +class ActionSheetExample extends React.Component { + state = { + clicked: 'none', + }; render() { return ( @@ -43,9 +41,9 @@ In this way, you can share images, videos, PDF files, etc.

</Text> </View> ); - }, + } - showActionSheet() { + showActionSheet = () => { ActionSheetIOS.showActionSheetWithOptions({ options: BUTTONS, cancelButtonIndex: CANCEL_INDEX, @@ -54,15 +52,13 @@ In this way, you can share images, videos, PDF files, etc.

(buttonIndex) => { this.setState({ clicked: BUTTONS[buttonIndex] }); }); - } -}); + }; +} -var ActionSheetTintExample = React.createClass({ - getInitialState() { - return { - clicked: 'none', - }; - }, +class ActionSheetTintExample extends React.Component { + state = { + clicked: 'none', + }; render() { return ( @@ -75,9 +71,9 @@ In this way, you can share images, videos, PDF files, etc.

</Text> </View> ); - }, + } - showActionSheet() { + showActionSheet = () => { ActionSheetIOS.showActionSheetWithOptions({ options: BUTTONS, cancelButtonIndex: CANCEL_INDEX, @@ -87,15 +83,13 @@ In this way, you can share images, videos, PDF files, etc.

(buttonIndex) => { this.setState({ clicked: BUTTONS[buttonIndex] }); }); - } -}); + }; +} -var ShareActionSheetExample = React.createClass({ - getInitialState() { - return { - text: '' - }; - }, +class ShareActionSheetExample extends React.Component { + state = { + text: '' + }; render() { return ( @@ -108,9 +102,9 @@ In this way, you can share images, videos, PDF files, etc.

</Text> </View> ); - }, + } - showShareActionSheet() { + showShareActionSheet = () => { ActionSheetIOS.showShareActionSheetWithOptions({ url: this.props.url, message: 'message to go with the shared url', @@ -129,15 +123,13 @@ In this way, you can share images, videos, PDF files, etc.

} this.setState({text}); }); - } -}); + }; +} -var ShareScreenshotExample = React.createClass({ - getInitialState() { - return { - text: '' - }; - }, +class ShareScreenshotExample extends React.Component { + state = { + text: '' + }; render() { return ( @@ -150,9 +142,9 @@ In this way, you can share images, videos, PDF files, etc.

</Text> </View> ); - }, + } - showShareActionSheet() { + showShareActionSheet = () => { // Take the snapshot (returns a temp file uri) UIManager.takeSnapshot('window').then((uri) => { // Share image data @@ -173,8 +165,8 @@ In this way, you can share images, videos, PDF files, etc.

this.setState({text}); }); }).catch((error) => alert(error)); - } -}); + }; +} var style = StyleSheet.create({ button: { diff --git a/releases/next/docs/adsupportios.html b/releases/next/docs/adsupportios.html index 85e46c7df2a..3a9210c9d96 100644 --- a/releases/next/docs/adsupportios.html +++ b/releases/next/docs/adsupportios.html @@ -22,15 +22,13 @@ exports.examples } ]; -var AdSupportIOSExample = React.createClass({ - getInitialState: function() { - return { - deviceID: 'No IDFA yet', - hasAdvertiserTracking: 'unset', - }; - }, +class AdSupportIOSExample extends React.Component { + state = { + deviceID: 'No IDFA yet', + hasAdvertiserTracking: 'unset', + }; - componentDidMount: function() { + componentDidMount() { AdSupportIOS.getAdvertisingId( this._onDeviceIDSuccess, this._onDeviceIDFailure @@ -40,33 +38,33 @@ exports.examples this._onHasTrackingSuccess, this._onHasTrackingFailure ); - }, + } - _onHasTrackingSuccess: function(hasTracking) { + _onHasTrackingSuccess = (hasTracking) => { this.setState({ 'hasAdvertiserTracking': hasTracking, }); - }, + }; - _onHasTrackingFailure: function(e) { + _onHasTrackingFailure = (e) => { this.setState({ 'hasAdvertiserTracking': 'Error!', }); - }, + }; - _onDeviceIDSuccess: function(deviceID) { + _onDeviceIDSuccess = (deviceID) => { this.setState({ 'deviceID': deviceID, }); - }, + }; - _onDeviceIDFailure: function(e) { + _onDeviceIDFailure = (e) => { this.setState({ 'deviceID': 'Error!', }); - }, + }; - render: function() { + render() { return ( <View> <Text> @@ -80,7 +78,7 @@ exports.examples /View> ); } -}); +} var styles = StyleSheet.create({ title: { diff --git a/releases/next/docs/alert.html b/releases/next/docs/alert.html index 22da5312c68..df6005f8510 100644 --- a/releases/next/docs/alert.html +++ b/releases/next/docs/alert.html @@ -34,9 +34,8 @@ of a neutral, negative and a positive button: