From 376ec3f3a1183f2ffb7568644f06dba6dae8f5fd Mon Sep 17 00:00:00 2001 From: kacperkapusciak Date: Fri, 29 Sep 2023 08:28:51 +0200 Subject: [PATCH] Change links to current react-native docs url --- docs/docs/components/drawer-layout.mdx | 6 +++--- docs/docs/components/touchables.md | 8 ++++---- docs/docs/fundamentals/installation.md | 2 +- docs/docs/fundamentals/introduction.md | 2 +- docs/docs/gesture-handlers/common-gh.md | 8 ++++---- docs/docs/gestures/_shared/base-gesture-config.md | 2 +- docs/docs/under-the-hood/how-does-it-work.md | 2 +- .../version-1.x/api/components/drawer-layout.mdx | 6 +++--- .../version-1.x/api/components/touchables.md | 8 ++++---- .../version-1.x/api/gesture-handlers/common-gh.md | 8 ++++---- docs/versioned_docs/version-1.x/example.md | 2 +- docs/versioned_docs/version-1.x/getting-started.md | 4 ++-- 12 files changed, 29 insertions(+), 29 deletions(-) diff --git a/docs/docs/components/drawer-layout.mdx b/docs/docs/components/drawer-layout.mdx index 04abc42c72..b6ac2c18fb 100644 --- a/docs/docs/components/drawer-layout.mdx +++ b/docs/docs/components/drawer-layout.mdx @@ -7,7 +7,7 @@ sidebar_label: DrawerLayout import useBaseUrl from '@docusaurus/useBaseUrl'; import GifGallery from '@site/components/GifGallery'; -This is a cross-platform replacement for React Native's [DrawerLayoutAndroid](http://facebook.github.io/react-native/docs/drawerlayoutandroid.html) component. It provides a compatible API but allows for the component to be used on both Android and iOS. Please refer to [React Native docs](http://facebook.github.io/react-native/docs/drawerlayoutandroid.html) for the detailed usage for standard parameters. +This is a cross-platform replacement for React Native's [DrawerLayoutAndroid](http://reactnative.dev/docs/drawerlayoutandroid.html) component. It provides a compatible API but allows for the component to be used on both Android and iOS. Please refer to [React Native docs](http://reactnative.dev/docs/drawerlayoutandroid.html) for the detailed usage for standard parameters. ## Usage: @@ -49,11 +49,11 @@ number, allows for defining how far from the edge of the content view the gestur ### `hideStatusBar` -boolean, when set to `true` Drawer component will use [StatusBar](http://facebook.github.io/react-native/docs/statusbar.html) API to hide the OS status bar whenever the drawer is pulled or when its in an "open" state. +boolean, when set to `true` Drawer component will use [StatusBar](http://reactnative.dev/docs/statusbar.html) API to hide the OS status bar whenever the drawer is pulled or when its in an "open" state. ### `statusBarAnimation` -possible values are: `slide`, `none` or `fade` (defaults to `slide`). Can be used when `hideStatusBar` is set to `true` and will select the animation used for hiding/showing the status bar. See [StatusBar](http://facebook.github.io/react-native/docs/statusbar.html#statusbaranimation) documentation for more details. +possible values are: `slide`, `none` or `fade` (defaults to `slide`). Can be used when `hideStatusBar` is set to `true` and will select the animation used for hiding/showing the status bar. See [StatusBar](http://reactnative.dev/docs/statusbar.html#statusbaranimation) documentation for more details. ### `overlayColor` diff --git a/docs/docs/components/touchables.md b/docs/docs/components/touchables.md index 4b45292f72..1882c08c66 100644 --- a/docs/docs/components/touchables.md +++ b/docs/docs/components/touchables.md @@ -8,10 +8,10 @@ Gesture Handler library provides an implementation of RN's touchable components React Native's touchables API can be found here: -- [Touchable Native Feedback](https://facebook.github.io/react-native/docs/touchablenativefeedback) -- [Touchable Highlight](https://facebook.github.io/react-native/docs/touchablehighlight) -- [Touchable Opacity](https://facebook.github.io/react-native/docs/touchableopacity) -- [Touchable Without Feedback](https://facebook.github.io/react-native/docs/touchablewithoutfeedback) +- [Touchable Native Feedback](https://reactnative.dev/docs/touchablenativefeedback) +- [Touchable Highlight](https://reactnative.dev/docs/touchablehighlight) +- [Touchable Opacity](https://reactnative.dev/docs/touchableopacity) +- [Touchable Without Feedback](https://reactnative.dev/docs/touchablewithoutfeedback) All major touchable properties (except from `pressRetentionOffset`) have been adopted and should behave in a similar way as with RN's touchables. diff --git a/docs/docs/fundamentals/installation.md b/docs/docs/fundamentals/installation.md index 42bcfa653d..c80689904b 100644 --- a/docs/docs/fundamentals/installation.md +++ b/docs/docs/fundamentals/installation.md @@ -29,7 +29,7 @@ To use the version of react-native-gesture-handler that is compatible with your The Expo SDK incorporates the latest version of react-native-gesture-handler available at the time of each SDK release, so managed Expo apps might not always support all our latest features as soon as they are available. -### Bare [React Native](http://facebook.github.io/react-native/) +### Bare [React Native](http://reactnative.dev/) Since the library uses native support for handling gestures, it requires an extended installation to the norm. If you are starting a new project, you may want to initialize it with [expo-cli](https://docs.expo.io/versions/latest/workflow/expo-cli/) and use a bare template, they come pre-installed with react-native-gesture-handler. diff --git a/docs/docs/fundamentals/introduction.md b/docs/docs/fundamentals/introduction.md index b150fe584a..5d96d42832 100644 --- a/docs/docs/fundamentals/introduction.md +++ b/docs/docs/fundamentals/introduction.md @@ -6,7 +6,7 @@ sidebar_position: 1 slug: / --- -Gesture Handler aims to replace React Native's built in touch system called [Gesture Responder System](http://facebook.github.io/react-native/docs/gesture-responder-system). +Gesture Handler aims to replace React Native's built in touch system called [Gesture Responder System](http://reactnative.dev/docs/gesture-responder-system). The motivation for building this library was to address the performance limitations of React Native's Gesture Responder System and to provide more control over the built-in native components that can handle gestures. We recommend [this talk](https://www.youtube.com/watch?v=V8maYc4R2G0) by [Krzysztof Magiera](https://twitter.com/kzzzf) in which he explains issues with the responder system. diff --git a/docs/docs/gesture-handlers/common-gh.md b/docs/docs/gesture-handlers/common-gh.md index 7c2594403c..57cb9e555f 100644 --- a/docs/docs/gesture-handlers/common-gh.md +++ b/docs/docs/gesture-handlers/common-gh.md @@ -14,7 +14,7 @@ This page covers the common set of properties all gesture handler components exp ### Units All handler component properties and event attributes that represent onscreen dimensions are expressed in screen density independent units we refer to as "points". -These are the units commonly used in React Native ecosystem (e.g. in the [layout system](http://facebook.github.io/react-native/docs/flexbox.html)). +These are the units commonly used in React Native ecosystem (e.g. in the [layout system](http://reactnative.dev/docs/flexbox.html)). They do not map directly to physical pixels but instead to [iOS's points](https://developer.apple.com/library/content/documentation/2DDrawing/Conceptual/DrawingPrintingiOS/GraphicsDrawingOverview/GraphicsDrawingOverview.html#//apple_ref/doc/uid/TP40010156-CH14-SW7) and to [dp](https://developer.android.com/guide/topics/resources/more-resources#Dimension) units on Android. ## Properties @@ -62,7 +62,7 @@ When `width` is set it is only allow to specify one of the sides `right` or `lef Similarly when `height` is provided only `top` or `bottom` can be set. Specifying `width` or `height` is useful if we only want the gesture to activate on the edge of the view. In which case for example we can set `left: 0` and `width: 20` which would make it possible for the gesture to be recognize when started no more than 20 points from the left edge. -**IMPORTANT:** Note that this parameter is primarily designed to reduce the area where gesture can activate. Hence it is only supported for all the values (except `width` and `height`) to be non positive (0 or lower). Although on Android it is supported for the values to also be positive and therefore allow to expand beyond view bounds but not further than the parent view bounds. To achieve this effect on both platforms you can use React Native's View [hitSlop](https://facebook.github.io/react-native/docs/view.html#props) property. +**IMPORTANT:** Note that this parameter is primarily designed to reduce the area where gesture can activate. Hence it is only supported for all the values (except `width` and `height`) to be non positive (0 or lower). Although on Android it is supported for the values to also be positive and therefore allow to expand beyond view bounds but not further than the parent view bounds. To achieve this effect on both platforms you can use React Native's View [hitSlop](https://reactnative.dev/docs/view.html#props) property. ### `userSelect` (**web only**) @@ -76,7 +76,7 @@ This parameter allows to specify which cursor should be used when gesture activa Takes a callback that is going to be triggered for each subsequent touch event while the handler is in an [ACTIVE](/docs/under-the-hood/state#active) state. Event payload depends on the particular handler type. Common set of event data attributes is documented [below](#event-data) and handler specific attributes are documented on the corresponding handler pages. E.g. event payload for [`PinchGestureHandler`](/docs/gesture-handlers/rotation-gh#event-data) contains `scale` attribute that represents how the distance between fingers changed since when the gesture started. -Instead of a callback [`Animated.event`](https://facebook.github.io/react-native/docs/animated.html#event) object can be used. Also Animated events with `useNativeDriver` flag enabled **are fully supported**. +Instead of a callback [`Animated.event`](https://reactnative.dev/docs/animated.html#event) object can be used. Also Animated events with `useNativeDriver` flag enabled **are fully supported**. ### `onHandlerStateChange` @@ -86,7 +86,7 @@ The event payload contains the same payload as in case of [`onGestureEvent`](#on In addition `onHandlerStateChange` event payload contains `oldState` attribute which represents the [state](/docs/under-the-hood/state) of the handler right before the change. -Instead of a callback [`Animated.event`](https://facebook.github.io/react-native/docs/animated.html#event) object can be used. Also Animated events with `useNativeDriver` flag enabled **are fully supported**. +Instead of a callback [`Animated.event`](https://reactnative.dev/docs/animated.html#event) object can be used. Also Animated events with `useNativeDriver` flag enabled **are fully supported**. ## Event data diff --git a/docs/docs/gestures/_shared/base-gesture-config.md b/docs/docs/gestures/_shared/base-gesture-config.md index dfe45af566..7f87f244df 100644 --- a/docs/docs/gestures/_shared/base-gesture-config.md +++ b/docs/docs/gestures/_shared/base-gesture-config.md @@ -25,7 +25,7 @@ When `width` is set it is only allow to specify one of the sides `right` or `lef Similarly when `height` is provided only `top` or `bottom` can be set. Specifying `width` or `height` is useful if we only want the gesture to activate on the edge of the view. In which case for example we can set `left: 0` and `width: 20` which would make it possible for the gesture to be recognize when started no more than 20 points from the left edge. -**IMPORTANT:** Note that this parameter is primarily designed to reduce the area where gesture can activate. Hence it is only supported for all the values (except `width` and `height`) to be non positive (0 or lower). Although on Android it is supported for the values to also be positive and therefore allow to expand beyond view bounds but not further than the parent view bounds. To achieve this effect on both platforms you can use React Native's View [hitSlop](https://facebook.github.io/react-native/docs/view.html#props) property. +**IMPORTANT:** Note that this parameter is primarily designed to reduce the area where gesture can activate. Hence it is only supported for all the values (except `width` and `height`) to be non positive (0 or lower). Although on Android it is supported for the values to also be positive and therefore allow to expand beyond view bounds but not further than the parent view bounds. To achieve this effect on both platforms you can use React Native's View [hitSlop](https://reactnative.dev/docs/view.html#hitslop) property. ### `withRef(ref)` diff --git a/docs/docs/under-the-hood/how-does-it-work.md b/docs/docs/under-the-hood/how-does-it-work.md index a4553a478f..4d613d4879 100644 --- a/docs/docs/under-the-hood/how-does-it-work.md +++ b/docs/docs/under-the-hood/how-does-it-work.md @@ -7,7 +7,7 @@ sidebar_label: How does it work? ### Units All handler component properties and event attributes that represent onscreen dimensions are expressed in screen density independent units we refer to as "points". -These are the units commonly used in React Native ecosystem (e.g. in the [layout system](http://facebook.github.io/react-native/docs/flexbox.html)). +These are the units commonly used in React Native ecosystem (e.g. in the [layout system](http://reactnative.dev/docs/flexbox.html)). They do not map directly to physical pixels but instead to [iOS's points](https://developer.apple.com/library/content/documentation/2DDrawing/Conceptual/DrawingPrintingiOS/GraphicsDrawingOverview/GraphicsDrawingOverview.html#//apple_ref/doc/uid/TP40010156-CH14-SW7) and to [dp](https://developer.android.com/guide/topics/resources/more-resources#Dimension) units on Android. ## iOS diff --git a/docs/versioned_docs/version-1.x/api/components/drawer-layout.mdx b/docs/versioned_docs/version-1.x/api/components/drawer-layout.mdx index b3e4373d1e..c1a426222c 100644 --- a/docs/versioned_docs/version-1.x/api/components/drawer-layout.mdx +++ b/docs/versioned_docs/version-1.x/api/components/drawer-layout.mdx @@ -7,7 +7,7 @@ sidebar_label: DrawerLayout import useBaseUrl from '@docusaurus/useBaseUrl'; import GifGallery from '@site/components/GifGallery'; -This is a cross-platform replacement for React Native's [DrawerLayoutAndroid](http://facebook.github.io/react-native/docs/drawerlayoutandroid.html) component. It provides a compatible API but allows for the component to be used on both Android and iOS. Please refer to [React Native docs](http://facebook.github.io/react-native/docs/drawerlayoutandroid.html) for the detailed usage for standard parameters. +This is a cross-platform replacement for React Native's [DrawerLayoutAndroid](http://reactnative.dev/docs/drawerlayoutandroid.html) component. It provides a compatible API but allows for the component to be used on both Android and iOS. Please refer to [React Native docs](http://reactnative.dev/docs/drawerlayoutandroid.html) for the detailed usage for standard parameters. ## Usage: @@ -49,11 +49,11 @@ number, allows for defining how far from the edge of the content view the gestur ### `hideStatusBar` -boolean, when set to `true` Drawer component will use [StatusBar](http://facebook.github.io/react-native/docs/statusbar.html) API to hide the OS status bar whenever the drawer is pulled or when its in an "open" state. +boolean, when set to `true` Drawer component will use [StatusBar](http://reactnative.dev/docs/statusbar.html) API to hide the OS status bar whenever the drawer is pulled or when its in an "open" state. ### `statusBarAnimation` -possible values are: `slide`, `none` or `fade` (defaults to `slide`). Can be used when `hideStatusBar` is set to `true` and will select the animation used for hiding/showing the status bar. See [StatusBar](http://facebook.github.io/react-native/docs/statusbar.html#statusbaranimation) documentation for more details. +possible values are: `slide`, `none` or `fade` (defaults to `slide`). Can be used when `hideStatusBar` is set to `true` and will select the animation used for hiding/showing the status bar. See [StatusBar](http://reactnative.dev/docs/statusbar.html#statusbaranimation) documentation for more details. ### `overlayColor` diff --git a/docs/versioned_docs/version-1.x/api/components/touchables.md b/docs/versioned_docs/version-1.x/api/components/touchables.md index 6458acbbcd..107b89695c 100644 --- a/docs/versioned_docs/version-1.x/api/components/touchables.md +++ b/docs/versioned_docs/version-1.x/api/components/touchables.md @@ -8,10 +8,10 @@ Gesture Handler library provides an implementation of RN's touchable components React Native's touchables API can be found here: -- [Touchable Native Feedback](https://facebook.github.io/react-native/docs/touchablenativefeedback) -- [Touchable Highlight](https://facebook.github.io/react-native/docs/touchablehighlight) -- [Touchable Opacity](https://facebook.github.io/react-native/docs/touchableopacity) -- [Touchable Without Feedback](https://facebook.github.io/react-native/docs/touchablewithoutfeedback) +- [Touchable Native Feedback](https://reactnative.dev/docs/touchablenativefeedback) +- [Touchable Highlight](https://reactnative.dev/docs/touchablehighlight) +- [Touchable Opacity](https://reactnative.dev/docs/touchableopacity) +- [Touchable Without Feedback](https://reactnative.dev/docs/touchablewithoutfeedback) All major touchable properties (except from `pressRetentionOffset`) have been adopted and should behave in a similar way as with RN's touchables. diff --git a/docs/versioned_docs/version-1.x/api/gesture-handlers/common-gh.md b/docs/versioned_docs/version-1.x/api/gesture-handlers/common-gh.md index e7cf697983..4c077a212a 100644 --- a/docs/versioned_docs/version-1.x/api/gesture-handlers/common-gh.md +++ b/docs/versioned_docs/version-1.x/api/gesture-handlers/common-gh.md @@ -9,7 +9,7 @@ This page covers the common set of properties all gesture handler components exp ### Units All handler component properties and event attributes that represent onscreen dimensions are expressed in screen density independent units we refer to as "points". -These are the units commonly used in React Native ecosystem (e.g. in the [layout system](http://facebook.github.io/react-native/docs/flexbox.html)). +These are the units commonly used in React Native ecosystem (e.g. in the [layout system](http://reactnative.dev/docs/flexbox.html)). They do not map directly to physical pixels but instead to [iOS's points](https://developer.apple.com/library/content/documentation/2DDrawing/Conceptual/DrawingPrintingiOS/GraphicsDrawingOverview/GraphicsDrawingOverview.html#//apple_ref/doc/uid/TP40010156-CH14-SW7) and to [dp](https://developer.android.com/guide/topics/resources/more-resources#Dimension) units on Android. ## Properties @@ -51,13 +51,13 @@ When `width` is set it is only allow to specify one of the sides `right` or `lef Similarly when `height` is provided only `top` or `bottom` can be set. Specifying `width` or `height` is useful if we only want the gesture to activate on the edge of the view. In which case for example we can set `left: 0` and `width: 20` which would make it possible for the gesture to be recognize when started no more than 20 points from the left edge. -**IMPORTANT:** Note that this parameter is primarily designed to reduce the area where gesture can activate. Hence it is only supported for all the values (except `width` and `height`) to be non positive (0 or lower). Although on Android it is supported for the values to also be positive and therefore allow to expand beyond view bounds but not further than the parent view bounds. To achieve this effect on both platforms you can use React Native's View [hitSlop](https://facebook.github.io/react-native/docs/view.html#props) property. +**IMPORTANT:** Note that this parameter is primarily designed to reduce the area where gesture can activate. Hence it is only supported for all the values (except `width` and `height`) to be non positive (0 or lower). Although on Android it is supported for the values to also be positive and therefore allow to expand beyond view bounds but not further than the parent view bounds. To achieve this effect on both platforms you can use React Native's View [hitSlop](https://reactnative.dev/docs/view.html#hitslop) property. ### `onGestureEvent` Takes a callback that is going to be triggered for each subsequent touch event while the handler is in an [ACTIVE](/docs/under-the-hood/state#active) state. Event payload depends on the particular handler type. Common set of event data attributes is documented [below](#event-data) and handler specific attributes are documented on the corresponding handler pages. E.g. event payload for [`PinchGestureHandler`](rotation-gh#event-data) contains `scale` attribute that represents how the distance between fingers changed since when the gesture started. -Instead of a callback [`Animated.event`](https://facebook.github.io/react-native/docs/animated.html#event) object can be used. Also Animated events with `useNativeDriver` flag enabled **are fully supported**. +Instead of a callback [`Animated.event`](https://reactnative.dev/docs/animated.html#event) object can be used. Also Animated events with `useNativeDriver` flag enabled **are fully supported**. ### `onHandlerStateChange` @@ -67,7 +67,7 @@ The event payload contains the same payload as in case of [`onGestureEvent`](#on In addition `onHandlerStateChange` event payload contains `oldState` attribute which represents the [state](/docs/under-the-hood/state) of the handler right before the change. -Instead of a callback [`Animated.event`](https://facebook.github.io/react-native/docs/animated.html#event) object can be used. Also Animated events with `useNativeDriver` flag enabled **are fully supported**. +Instead of a callback [`Animated.event`](https://reactnative.dev/docs/animated.html#event) object can be used. Also Animated events with `useNativeDriver` flag enabled **are fully supported**. ## Event data diff --git a/docs/versioned_docs/version-1.x/example.md b/docs/versioned_docs/version-1.x/example.md index 9527cc83aa..0c5e3b2634 100644 --- a/docs/versioned_docs/version-1.x/example.md +++ b/docs/versioned_docs/version-1.x/example.md @@ -21,7 +21,7 @@ You can run example app on [Expo](https://expo.io). Follow instructions under [t ## Running example app locally -Before you begin you should follow [React Native's setup steps](http://facebook.github.io/react-native/docs/getting-started.html) to make sure you have all the tools necessary to build and run React Native apps installed. +Before you begin you should follow [React Native's setup steps](http://reactnative.dev/docs/getting-started.html) to make sure you have all the tools necessary to build and run React Native apps installed. The example app is a regular React Native app, so in case of problems or to learn about available commands you may want to [check react-native cli documentation](https://github.com/react-native-community/cli/blob/master/README.md). In order to run example app you need to clone the repo first: diff --git a/docs/versioned_docs/version-1.x/getting-started.md b/docs/versioned_docs/version-1.x/getting-started.md index b66c9677c6..854cf26780 100644 --- a/docs/versioned_docs/version-1.x/getting-started.md +++ b/docs/versioned_docs/version-1.x/getting-started.md @@ -5,7 +5,7 @@ sidebar_label: Getting Started slug: / --- -Gesture Handler aims to replace React Native's built in touch system called [Gesture Responder System](http://facebook.github.io/react-native/docs/gesture-responder-system). +Gesture Handler aims to replace React Native's built in touch system called [Gesture Responder System](http://reactnative.dev/docs/gesture-responder-system). The motivation for building this library was to address the performance limitations of React Native's Gesture Responder System and to provide more control over the built-in native components that can handle gestures. We recommend [this talk](https://www.youtube.com/watch?v=V8maYc4R2G0) by [Krzysztof Magiera](https://twitter.com/kzzzf) in which he explains issues with the responder system. @@ -40,7 +40,7 @@ To use the version of react-native-gesture-handler that is compatible with your The Expo SDK incorporates the latest version of react-native-gesture-handler available at the time of each SDK release, so managed Expo apps might not always support all our latest features as soon as they are available. -#### Bare [React Native](http://facebook.github.io/react-native/) +#### Bare [React Native](http://reactnative.dev/) Since the library uses native support for handling gestures, it requires an extended installation to the norm. If you are starting a new project, you may want to initialize it with [expo-cli](https://docs.expo.io/versions/latest/workflow/expo-cli/) and use a bare template, they come pre-installed with react-native-gesture-handler.