Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ node_modules/
.expo/
dist/
web-build/
ios

# Native
*.orig.*
Expand Down
41 changes: 22 additions & 19 deletions examples/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import JavascriptClassExample from './example-src-files/javascript-class-example
import JavascriptFunctionExample from './example-src-files/javascript-function-example';
import TypescriptClassExample from './example-src-files/typescript-class-example';
import TypescriptFunctionExample from './example-src-files/typescript-function-example';
import { GestureHandlerRootView } from 'react-native-gesture-handler';

enum ExampleComponent {
JavaScriptClassSingleValue,
Expand Down Expand Up @@ -130,31 +131,33 @@ export default class App extends React.Component<Props, State> {
const { currentExample, examplePickerOpen, exampleComponents } = this.state;

return (
<View style={styles.container}>
<View style={{ flex: 1 }}>
<GestureHandlerRootView style={{ flex: 1 }}>
<View style={styles.container}>
<View style={{ flex: 1 }}>
<Text>Choose example:</Text>
<View style={{ flex: 1 }}>
<Text>Choose example:</Text>
</View>

<View style={{ flex: 1 }}>
<DropDownPicker
setValue={this.setCurrentExample}
value={currentExample}
items={exampleComponents}
open={examplePickerOpen}
setOpen={this.setOpen}
/>
</View>
</View>

<View style={{ flex: 1 }}>
<DropDownPicker
setValue={this.setCurrentExample}
value={currentExample}
items={exampleComponents}
open={examplePickerOpen}
setOpen={this.setOpen}
/>
</View>
</View>
<View style={{ flex: 3 }}>
<View style={{ flex: 1 }}>
<Text>Example:</Text>
</View>

<View style={{ flex: 3 }}>
<View style={{ flex: 1 }}>
<Text>Example:</Text>
{App.getExample(currentExample)}
</View>

{App.getExample(currentExample)}
</View>
</View>
</GestureHandlerRootView>
);
}
}
21 changes: 21 additions & 0 deletions examples/metro.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const { getDefaultConfig } = require('expo/metro-config');
const path = require('path');

const projectRoot = __dirname;
const workspaceRoot = path.resolve(__dirname, '..');

const config = getDefaultConfig(projectRoot);

config.watchFolders = [workspaceRoot];

config.resolver = {
...config.resolver,
nodeModulesPaths: [
path.join(projectRoot, 'node_modules'),
path.join(workspaceRoot, 'node_modules'),
],
unstable_enableSymlinks: true,
unstable_enablePackageExports: true,
};

module.exports = config;
Loading