Skip to content
This repository was archived by the owner on Nov 27, 2022. It is now read-only.

Commit 2a999c8

Browse files
committed
docs: define renderScene outside the component in example
1 parent 6dc7fb6 commit 2a999c8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ const SecondRoute = () => (
6161
<View style={{ flex: 1, backgroundColor: '#673ab7' }} />
6262
);
6363

64+
const renderScene = SceneMap({
65+
first: FirstRoute,
66+
second: SecondRoute,
67+
});
68+
6469
export default function TabViewExample() {
6570
const layout = useWindowDimensions();
6671

@@ -70,11 +75,6 @@ export default function TabViewExample() {
7075
{ key: 'second', title: 'Second' },
7176
]);
7277

73-
const renderScene = SceneMap({
74-
first: FirstRoute,
75-
second: SecondRoute,
76-
});
77-
7878
return (
7979
<TabView
8080
navigationState={{ index, routes }}

0 commit comments

Comments
 (0)