Skip to content

Commit a69a563

Browse files
authored
Add empty example (#2564)
## Description This PR adds empty example to our example app. It can be helpful when it comes to testing reproductions from issues or just some new features/ideas. You can find similar idea in `react-native-reanimated` and it is very useful. ## Test plan Tested (?) on example app
1 parent 5c7118a commit a69a563

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

example/src/App.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ import BetterHorizontalDrawer from './new_api/betterHorizontalDrawer';
4545
import ManualGestures from './new_api/manualGestures';
4646
import VelocityTest from './new_api/velocityTest';
4747

48+
import EmptyExample from './empty/EmptyExample';
49+
4850
interface Example {
4951
name: string;
5052
component: React.ComponentType;
@@ -55,6 +57,10 @@ interface ExamplesSection {
5557
}
5658

5759
const EXAMPLES: ExamplesSection[] = [
60+
{
61+
sectionTitle: 'Empty',
62+
data: [{ name: 'Empty Example', component: EmptyExample }],
63+
},
5864
{
5965
sectionTitle: 'Basic examples',
6066
data: [

example/src/empty/EmptyExample.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import React from 'react';
2+
import { StyleSheet, Text, View } from 'react-native';
3+
4+
export default function EmptyExample() {
5+
return (
6+
<View style={styles.container}>
7+
<Text>Hello World!</Text>
8+
</View>
9+
);
10+
}
11+
12+
const styles = StyleSheet.create({
13+
container: {
14+
flex: 1,
15+
justifyContent: 'center',
16+
alignItems: 'center',
17+
backgroundColor: '#F5FCFF',
18+
},
19+
});

0 commit comments

Comments
 (0)