Skip to content

Commit fed3ee5

Browse files
committed
Mergele @mbert/monorepo
2 parents 705d634 + a7b7787 commit fed3ee5

17 files changed

Lines changed: 1366 additions & 1554 deletions

File tree

.lintstagedrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"*.(js|jsx|ts|tsx)": ["yarn eslint", "yarn prettier --write"]
3+
}

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ It makes touch interactions and gesture tracking not only smooth, but also depen
1111

1212
Check [getting started](https://docs.swmansion.com/react-native-gesture-handler/docs/#installation) section of our docs for the detailed installation instructions.
1313

14-
## Fabric
15-
16-
To learn how to use `react-native-gesture-handler` with Fabric architecture, head over to [Fabric README](README-Fabric.md). Instructions on how to run Fabric Example within this repo can be found in the [FabricExample README](FabricExample/README.md).
17-
1814
## Documentation
1915

2016
Check out our dedicated documentation page for info about this library, API reference and more: [https://docs.swmansion.com/react-native-gesture-handler/docs/](https://docs.swmansion.com/react-native-gesture-handler/docs/)

apps/BasicExample/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ react {
4545

4646
/* Hermes Commands */
4747
// The hermes compiler command to run. By default it is 'hermesc'
48-
hermesCommand = "../../node_modules/react-native/sdks/hermesc/osx-bin/hermesc"
48+
hermesCommand = "../../../../node_modules/react-native/sdks/hermesc/osx-bin/hermesc"
4949
//
5050
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
5151
// hermesFlags = ["-O", "-output-source-map"]

apps/BasicExample/android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# Specifies the JVM arguments used for the daemon process.
1111
# The setting is particularly useful for tweaking memory settings.
1212
# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
13-
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
13+
org.gradle.jvmargs=-Xmx512m -XX:MaxMetaspaceSize=512m
1414

1515
# When configured, Gradle will run in incubating parallel mode.
1616
# This option should only be used with decoupled projects. More details, visit

apps/BasicExample/src/App.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react';
2-
import { SafeAreaView } from 'react-native';
2+
import { SafeAreaView, Platform } from 'react-native';
33
import { GestureHandlerRootView } from 'react-native-gesture-handler';
44

55
import Navigator from './Navigator';
@@ -49,8 +49,9 @@ Stack.setRoutes({
4949

5050
export default function App() {
5151
return (
52-
<GestureHandlerRootView style={{ flex: 1, paddingTop: 50 }}>
53-
<SafeAreaView style={{ flex: 1 }}>
52+
<GestureHandlerRootView style={{ flex: 1 }}>
53+
<SafeAreaView
54+
style={[{ flex: 1 }, Platform.OS === 'android' && { paddingTop: 50 }]}>
5455
<Stack.Navigator initialRouteName="home" />
5556
</SafeAreaView>
5657
</GestureHandlerRootView>

apps/CommonApp/.bundle/config

Lines changed: 0 additions & 2 deletions
This file was deleted.

apps/CommonApp/README.md

Lines changed: 2 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,3 @@
1-
This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli).
1+
# Gesture Handler example app
22

3-
# Getting Started
4-
5-
> **Note**: Make sure you have completed the [Set Up Your Environment](https://reactnative.dev/docs/set-up-your-environment) guide before proceeding.
6-
7-
## Step 1: Start Metro
8-
9-
First, you will need to run **Metro**, the JavaScript build tool for React Native.
10-
11-
To start the Metro dev server, run the following command from the root of your React Native project:
12-
13-
```sh
14-
# Using npm
15-
npm start
16-
17-
# OR using Yarn
18-
yarn start
19-
```
20-
21-
## Step 2: Build and run your app
22-
23-
With Metro running, open a new terminal window/pane from the root of your React Native project, and use one of the following commands to build and run your Android or iOS app:
24-
25-
### Android
26-
27-
```sh
28-
# Using npm
29-
npm run android
30-
31-
# OR using Yarn
32-
yarn android
33-
```
34-
35-
### iOS
36-
37-
For iOS, remember to install CocoaPods dependencies (this only needs to be run on first clone or after updating native deps).
38-
39-
The first time you create a new project, run the Ruby bundler to install CocoaPods itself:
40-
41-
```sh
42-
bundle install
43-
```
44-
45-
Then, and every time you update your native dependencies, run:
46-
47-
```sh
48-
bundle exec pod install
49-
```
50-
51-
For more information, please visit [CocoaPods Getting Started guide](https://guides.cocoapods.org/using/getting-started.html).
52-
53-
```sh
54-
# Using npm
55-
npm run ios
56-
57-
# OR using Yarn
58-
yarn ios
59-
```
60-
61-
If everything is set up correctly, you should see your new app running in the Android Emulator, iOS Simulator, or your connected device.
62-
63-
This is one way to run your app — you can also build it directly from Android Studio or Xcode.
64-
65-
## Step 3: Modify your app
66-
67-
Now that you have successfully run the app, let's make changes!
68-
69-
Open `App.tsx` in your text editor of choice and make some changes. When you save, your app will automatically update and reflect these changes — this is powered by [Fast Refresh](https://reactnative.dev/docs/fast-refresh).
70-
71-
When you want to forcefully reload, for example to reset the state of your app, you can perform a full reload:
72-
73-
- **Android**: Press the <kbd>R</kbd> key twice or select **"Reload"** from the **Dev Menu**, accessed via <kbd>Ctrl</kbd> + <kbd>M</kbd> (Windows/Linux) or <kbd>Cmd ⌘</kbd> + <kbd>M</kbd> (macOS).
74-
- **iOS**: Press <kbd>R</kbd> in iOS Simulator.
75-
76-
## Congratulations! :tada:
77-
78-
You've successfully run and modified your React Native App. :partying_face:
79-
80-
### Now what?
81-
82-
- If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps).
83-
- If you're curious to learn more about React Native, check out the [docs](https://reactnative.dev/docs/getting-started).
84-
85-
# Troubleshooting
86-
87-
If you're having issues getting the above steps to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page.
88-
89-
# Learn More
90-
91-
To learn more about React Native, take a look at the following resources:
92-
93-
- [React Native Website](https://reactnative.dev) - learn more about React Native.
94-
- [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment.
95-
- [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**.
96-
- [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts.
97-
- [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native.
3+
This is project contains source code for examples shared betwwen example apps.

apps/CommonApp/jest.config.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

apps/CommonApp/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"noEmit": true,
55
"baseUrl": ".",
66
"paths": {
7-
"@/*": ["src/*"],
7+
"@/*": ["./*"],
88
"react-native-gesture-handler": [
99
"../../packages/react-native-gesture-handler/index.ts"
1010
],

apps/ExpoExample/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Gesture Handler Expo example app
2+
3+
This is an example application demonstrating the functionality of the react-native-gesture-handler library with Expo.
4+
5+
## Installing & running application
6+
7+
Before running the application, you need to install all dependencies. To do that:
8+
9+
- In the project's root directory, run `yarn`.
10+
11+
Next run `npx expo prebuild`.
12+
13+
## Android
14+
15+
Run this application by `yarn android` or from Android Studio.
16+
17+
## iOS
18+
19+
Run `yarn ios` or run application from Xcode.
20+
21+
## Web
22+
23+
Run `yarn web`. Alternatively run `yarn start` and in browser navigate to localhost:8081

0 commit comments

Comments
 (0)