Skip to content

Commit 430765b

Browse files
huntiefacebook-github-bot
authored andcommitted
Update SafeAreaViewExample to lazily require deprecated API (#53922)
Summary: Pull Request resolved: #53922 Minor change motivated by restoring a clean JS console on startup for RNTester. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D83145673 fbshipit-source-id: be64b057b842f4922328f5bc62dc001d016fd0b7
1 parent ed6aa0f commit 430765b

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

packages/rn-tester/js/examples/SafeAreaView/SafeAreaViewExample.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,10 @@ import type {RNTesterModuleExample} from '../../types/RNTesterTypes';
1515
import RNTesterText from '../../components/RNTesterText';
1616
import React from 'react';
1717
import {useState} from 'react';
18-
import {
19-
Button,
20-
DeviceInfo,
21-
Modal,
22-
SafeAreaView,
23-
StyleSheet,
24-
View,
25-
} from 'react-native';
18+
import {Button, DeviceInfo, Modal, StyleSheet, View} from 'react-native';
2619

2720
function SafeAreaViewExample(): React.Node {
21+
const {SafeAreaView} = require('react-native');
2822
const [modalVisible, setModalVisible] = useState<boolean>(false);
2923

3024
const toggleModal = (visible: boolean) => {

0 commit comments

Comments
 (0)