Files
react-native/packages/rn-tester/js/examples/Crash/CrashExample.js
T
Eric Rozell 042179a742 Replace 'React' with 'react' in rntester examples (#37185)
Summary:
React Native macOS:
Please note, I do not plan to

Pull Request resolved: https://github.com/facebook/react-native/pull/37185

Updates a few imports in RNTester to 'react' as we had previously done in:
https://github.com/facebook/react-native/commit/0ee5f689

Changelog: [Internal]

Reviewed By: jacdebug

Differential Revision: D45445211

fbshipit-source-id: 7d345a874bd8b99ddb11ebb5385c2a07330a6531
2023-05-02 08:21:34 -07:00

40 lines
882 B
JavaScript

/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict-local
*/
import type {Node} from 'react';
import {Button} from 'react-native';
import React from 'react';
exports.displayName = (undefined: ?string);
exports.framework = 'React';
exports.title = 'Crash';
exports.category = 'Basic';
exports.description = 'Crash examples.';
exports.examples = [
{
title: 'JS crash',
render(): Node {
return (
<Button
title="JS crash"
onPress={() => {
const a = {};
// $FlowIgnore[prop-missing]
// $FlowIgnore[incompatible-use]
const b = a.w.q; // js crash here
console.log(b);
}}
/>
);
},
},
];