From 6790cf137f73f2d7863911f9115317048c66a6ee Mon Sep 17 00:00:00 2001 From: George Zahariev Date: Fri, 29 Oct 2021 20:07:30 -0700 Subject: [PATCH] Change usages of `exports.foo` and `module.exports.foo` to just `foo` Summary: Change usages of `exports.foo` and `module.exports.foo` to just `foo`. This will fix future errors when Flow no longer allows reads from `exports`/`module.exports`. Changelog: [Internal] Reviewed By: bradzacher Differential Revision: D32009490 fbshipit-source-id: bb609b37ba948b44c3877f8dbbfa9137b963586b --- .../examples/ScrollView/ScrollViewExample.js | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/packages/rn-tester/js/examples/ScrollView/ScrollViewExample.js b/packages/rn-tester/js/examples/ScrollView/ScrollViewExample.js index 4668599fb2a..05d7233a4dc 100644 --- a/packages/rn-tester/js/examples/ScrollView/ScrollViewExample.js +++ b/packages/rn-tester/js/examples/ScrollView/ScrollViewExample.js @@ -34,7 +34,7 @@ exports.documentationURL = 'https://reactnative.dev/docs/scrollview'; exports.category = 'Basic'; exports.description = 'Component that enables scrolling through child components'; -exports.examples = ([ +const examples = ([ { name: 'scrollTo', title: '\n', @@ -269,7 +269,7 @@ exports.examples = ([ ]: Array); if (Platform.OS === 'ios') { - exports.examples.push({ + examples.push({ title: ' smooth bi-directional content loading\n', description: 'The `maintainVisibleContentPosition` prop allows insertions to either end of the content ' + @@ -391,7 +391,7 @@ if (Platform.OS === 'ios') { return ; }, }); - exports.examples.push({ + examples.push({ title: ' (centerContent = true)\n', description: 'ScrollView puts its content in the center if the content is smaller than scroll view', @@ -406,7 +406,7 @@ if (Platform.OS === 'ios') { return ; }, }); - exports.examples.push({ + examples.push({ title: ' (contentOffset = {x: 100, y: 0})\n', description: 'Initial contentOffset can be set on ScrollView.', render: function(): React.Node { @@ -423,7 +423,7 @@ if (Platform.OS === 'ios') { return ; }, }); - exports.examples.push({ + examples.push({ title: ' Always Bounces\n', description: 'Always bounce vertically or horizontally.', render: function(): React.Node { @@ -437,35 +437,35 @@ if (Platform.OS === 'ios') { ); }, }); - exports.examples.push({ + examples.push({ title: ' Bounces & Bounces Zoom\n', description: 'There are different options for bouncing behavior.', render: function(): React.Node { return ; }, }); - exports.examples.push({ + examples.push({ title: ' Indicator Style\n', description: 'There are different options for indicator style colors.', render: function(): React.Node { return ; }, }); - exports.examples.push({ + examples.push({ title: ' Maximum & Minimum Zoom Scale\n', description: 'Set the maximum and minimum allowed zoom scale.', render: function(): React.Node { return ; }, }); - exports.examples.push({ + examples.push({ title: ' Maximum & Minimum Zoom Scale\n', description: 'Set the maximum and minimum allowed zoom scale.', render: function(): React.Node { return ; }, }); - exports.examples.push({ + examples.push({ title: ' ScrollTo Options\n', description: 'Toggle scrollToOverflowEnabled and scrollsToTop. When scrollToOverflowEnabled is true, the scroll view can be programmatically scrolled beyond its content size. When scrollsToTop is true, the scroll view scrolls to top when the status bar is tapped.', @@ -474,14 +474,14 @@ if (Platform.OS === 'ios') { }, }); } else if (Platform.OS === 'android') { - exports.examples.push({ + examples.push({ title: ' EndFillColor & FadingEdgeLength\n', description: 'Toggle to set endFillColor and fadingEdgeLength.', render: function(): React.Node { return ; }, }); - exports.examples.push({ + examples.push({ title: ' persistentScrollBar\n', description: 'Toggle to set persistentScrollbar option.', render: function(): React.Node { @@ -489,6 +489,7 @@ if (Platform.OS === 'ios') { }, }); } +exports.examples = examples; const AndroidScrollBarOptions = () => { const [persistentScrollBar, setPersistentScrollBar] = useState(false);