diff --git a/packages/rn-tester/js/examples/Dimensions/DimensionsExample.js b/packages/rn-tester/js/examples/Dimensions/DimensionsExample.js
index 7d2b1ccf1ee..37b6c77b526 100644
--- a/packages/rn-tester/js/examples/Dimensions/DimensionsExample.js
+++ b/packages/rn-tester/js/examples/Dimensions/DimensionsExample.js
@@ -13,7 +13,7 @@ import type {RNTesterModuleExample} from '../../types/RNTesterTypes';
import RNTesterText from '../../components/RNTesterText';
import * as React from 'react';
import {useEffect, useState} from 'react';
-import {Dimensions, useWindowDimensions} from 'react-native';
+import {Button, Dimensions, View, useWindowDimensions} from 'react-native';
type Props = {dim: string};
@@ -40,6 +40,22 @@ const DimensionsViaHook = () => {
);
};
+const DimensionsViaCall = ({dim}: Props) => {
+ const [info, setInfo] = useState(() => Dimensions.get(dim));
+ return (
+
+
+ );
+};
+
exports.title = 'Dimensions';
exports.category = 'UI';
exports.documentationURL = 'https://reactnative.dev/docs/dimensions';
@@ -52,15 +68,27 @@ exports.examples = [
},
},
{
- title: 'Non-component `get` API: window',
+ title: 'Non-component `get` API (subscription): window',
render(): React.MixedElement {
return ;
},
},
{
- title: 'Non-component `get` API: screen',
+ title: 'Non-component `get` API (subscription): screen',
render(): React.MixedElement {
return ;
},
},
+ {
+ title: 'Non-component `get` API (manual call): window',
+ render(): React.MixedElement {
+ return ;
+ },
+ },
+ {
+ title: 'Non-component `get` API (manual call): screen',
+ render(): React.MixedElement {
+ return ;
+ },
+ },
] as Array;
diff --git a/private/helloworld/App.tsx b/private/helloworld/App.tsx
index 09f7928a852..e692a7dd84d 100644
--- a/private/helloworld/App.tsx
+++ b/private/helloworld/App.tsx
@@ -26,7 +26,9 @@ function App(): React.ReactNode {
- Hello, World!
+
+ Hello, World!
+