mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Cleanup: Prefer React.Element over React$?Element
Reviewed By: vjeux Differential Revision: D4013049 fbshipit-source-id: 18a447fdbc584418d6a51770363bcd221e7fb7dc
This commit is contained in:
committed by
Facebook Github Bot
parent
beca25083a
commit
e8198aed8d
@@ -134,26 +134,26 @@ class EventSwitchExample extends React.Component {
|
||||
var examples = [
|
||||
{
|
||||
title: 'Switches can be set to true or false',
|
||||
render(): ReactElement<any> { return <BasicSwitchExample />; }
|
||||
render(): React.Element<any> { return <BasicSwitchExample />; }
|
||||
},
|
||||
{
|
||||
title: 'Switches can be disabled',
|
||||
render(): ReactElement<any> { return <DisabledSwitchExample />; }
|
||||
render(): React.Element<any> { return <DisabledSwitchExample />; }
|
||||
},
|
||||
{
|
||||
title: 'Change events can be detected',
|
||||
render(): ReactElement<any> { return <EventSwitchExample />; }
|
||||
render(): React.Element<any> { return <EventSwitchExample />; }
|
||||
},
|
||||
{
|
||||
title: 'Switches are controlled components',
|
||||
render(): ReactElement<any> { return <Switch />; }
|
||||
render(): React.Element<any> { return <Switch />; }
|
||||
}
|
||||
];
|
||||
|
||||
if (Platform.OS === 'ios') {
|
||||
examples.push({
|
||||
title: 'Custom colors can be provided',
|
||||
render(): ReactElement<any> { return <ColorSwitchExample />; }
|
||||
render(): React.Element<any> { return <ColorSwitchExample />; }
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user