/** * 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 * @oncall react_native */ 'use strict'; import * as React from 'react'; import {StyleSheet, View, Text, Button} from 'react-native'; import RNTesterPage from '../../components/RNTesterPage'; const {useState} = React; function MemoryExample(): React.Node { // Memory API testing const [memoryInfo, setMemoryInfo] = useState<{ jsHeapSizeLimit?: ?number, totalJSHeapSize?: ?number, usedJSHeapSize?: ?number, }>({}); const onGetMemoryInfo = () => { // performance.memory is not included in bom.js yet. // Once we release the change in flow this can be removed. // $FlowFixMe[prop-missing] // $FlowFixMe[incompatible-call] setMemoryInfo(performance.memory); }; return (