diff --git a/Libraries/Components/Switch/Switch.js b/Libraries/Components/Switch/Switch.js index 273139e716..705ae8fbea 100644 --- a/Libraries/Components/Switch/Switch.js +++ b/Libraries/Components/Switch/Switch.js @@ -1,5 +1,10 @@ /** - * Copyright 2004-present Facebook. All Rights Reserved. + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule Switch * @flow @@ -21,7 +26,15 @@ type DefaultProps = { }; /** - * Universal two-state toggle component. + * Renders a boolean input. + * + * This is a controlled component that requires an `onValueChange` callback that + * updates the `value` prop in order for the component to reflect user actions. + * If the `value` prop is not updated, the component will continue to render + * the supplied `value` prop instead of the expected result of any user actions. + * + * @keyword checkbox + * @keyword toggle */ var Switch = React.createClass({ propTypes: { diff --git a/Libraries/Components/SwitchAndroid/SwitchAndroid.android.js b/Libraries/Components/SwitchAndroid/SwitchAndroid.android.js index 2cbfb87dde..d9a2bbe1ab 100644 --- a/Libraries/Components/SwitchAndroid/SwitchAndroid.android.js +++ b/Libraries/Components/SwitchAndroid/SwitchAndroid.android.js @@ -20,7 +20,9 @@ var requireNativeComponent = require('requireNativeComponent'); var SWITCH = 'switch'; /** - * Standard Android two-state toggle component + * @deprecated + * + * Use instead for cross-platform compatibility. */ var SwitchAndroid = React.createClass({ mixins: [NativeMethodsMixin], diff --git a/Libraries/Components/SwitchIOS/SwitchIOS.ios.js b/Libraries/Components/SwitchIOS/SwitchIOS.ios.js index 798529c585..1546f41dfe 100644 --- a/Libraries/Components/SwitchIOS/SwitchIOS.ios.js +++ b/Libraries/Components/SwitchIOS/SwitchIOS.ios.js @@ -32,11 +32,9 @@ type DefaultProps = { type Event = Object; /** - * Use `SwitchIOS` to render a boolean input on iOS. This is - * a controlled component, so you must hook in to the `onValueChange` callback - * and update the `value` prop in order for the component to update, otherwise - * the user's change will be reverted immediately to reflect `props.value` as the - * source of truth. + * @deprecated + * + * Use instead for cross-platform compatibility. */ var SwitchIOS = React.createClass({ mixins: [NativeMethodsMixin],