-
Notifications
You must be signed in to change notification settings - Fork 0
docs: refresh public docs entry points #17
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,10 @@ | ||
| # Installation | ||
| import { PackageManagerTabs } from '@rspress/core/theme'; | ||
|
|
||
| Install the package and its React Native gesture/animation peer dependencies: | ||
| # Installation | ||
|
|
||
| ```sh | ||
| npm install @react-native-motion-kit/swipe-deck react-native-gesture-handler react-native-reanimated react-native-worklets | ||
| ``` | ||
| Install the package and its required React Native gesture/animation peer dependencies: | ||
|
|
||
| You can use your package manager of choice. For Yarn: | ||
|
|
||
| ```sh | ||
| yarn add @react-native-motion-kit/swipe-deck react-native-gesture-handler react-native-reanimated react-native-worklets | ||
| ``` | ||
| <PackageManagerTabs command="@react-native-motion-kit/swipe-deck react-native-gesture-handler react-native-reanimated react-native-worklets" /> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Rspress' Useful? React with 👍 / 👎. |
||
|
|
||
| ## Minimum Versions | ||
|
|
||
|
|
@@ -24,9 +18,13 @@ yarn add @react-native-motion-kit/swipe-deck react-native-gesture-handler react- | |
|
|
||
| ## React Native Setup | ||
|
|
||
| Follow the Reanimated and Worklets setup instructions for your React Native or | ||
| Expo version. In Babel config, make sure `react-native-worklets/plugin` is the | ||
| last Babel plugin. | ||
| Follow the official setup guides for your React Native or Expo version: | ||
|
|
||
| - [React Native Reanimated getting started](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started/) | ||
| - [React Native Gesture Handler installation](https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/installation) | ||
|
|
||
| In Babel config, make sure `react-native-worklets/plugin` is the last Babel | ||
| plugin. | ||
|
|
||
| ```js title="babel.config.js" | ||
| module.exports = { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When this README example is pasted as a normal screen, the new outer
Viewhas noflex: 1or fixed height, so the deck's ownflex: 1container can measure with height 0;getSwipeDeckStaterequires both layout dimensions to be positive beforecanSwipebecomes true, leaving the sample buttons disabled and gestures unable to commit. Addstyle={{ flex: 1 }}here or otherwise give the deck a definite height.Useful? React with 👍 / 👎.