1import * as React from 'react'; 2import { Button } from 'react-native'; 3 4import { Page, Section } from '../components/Page'; 5 6export default function ErrorScreen() { 7 return ( 8 <Page> 9 <Section title="Errors"> 10 <Button 11 title="JavaScript error" 12 onPress={() => { 13 // Should present a full screen error message that can be dismissed. 14 const foo = {}; 15 // @ts-ignore: should error out 16 const b = foo.bar.lol; 17 console.log(b); 18 }} 19 /> 20 <Button 21 title="Console error" 22 onPress={() => { 23 // Should present a toast. 24 console.error(new Error('Hello')); 25 }} 26 /> 27 </Section> 28 </Page> 29 ); 30} 31 32ErrorScreen.navigationOptions = { 33 title: 'Errors', 34}; 35