Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add information about GestureHandlerRootView area and change component name in quick start section in docs. #2899

Merged
merged 2 commits into from
May 7, 2024
Merged
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
2 changes: 1 addition & 1 deletion docs/docs/fundamentals/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default function App() {
:::info
If you use props such as `shouldCancelWhenOutside`, `simultaneousHandlers`, `waitFor` etc. with gesture handlers, the handlers need to be mounted under a single `GestureHandlerRootView`. So it's important to keep the `GestureHandlerRootView` as close to the actual root view as possible.

Note that `GestureHandlerRootView` acts like a normal `View`. So if you want it to fill the screen, you will need to pass `{ flex: 1 }` like you'll need to do with a normal `View`. By default, it'll take the size of the content nested inside.
Note that `GestureHandlerRootView` acts like a normal `View`. Also, gestures will only be recognized within the `GestureHandlerRootView` area. So if you want it to fill the screen, you will need to pass `{ flex: 1 }` like you'll need to do with a normal `View`. By default, it'll take the size of the content nested inside.
:::

:::tip
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/fundamentals/quickstart/_steps/step3.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
withSpring,
} from 'react-native-reanimated';

function App() {
function Ball() {
const isPressed = useSharedValue(false);
const offset = useSharedValue({ x: 0, y: 0 });

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/fundamentals/quickstart/_steps/step5.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
```jsx
import { Gesture } from 'react-native-gesture-handler';

function App() {
function Ball() {
// ...
const start = useSharedValue({ x: 0, y: 0 });
const gesture = Gesture.Pan()
Expand Down
Loading