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

Update introduction and installation pages in the documentation #3274

Merged
merged 9 commits into from
Dec 10, 2024

Conversation

j-piasecki
Copy link
Member

Description

Update introduction page:

  • Move the part about automatic workletization to troubleshooting, that's not really an intro-level topic
  • Updated the package description and benefits
  • Removed link to not working app
  • Added social media links so that the docs don't explicitly tell you to contact kzzzf 😄

Updated installation page:

  • Updated the version compatibility table
  • Divided the installation into three-part process:
    • Add package
    • Add root view
    • "Platform-specific"
  • Removed part about enabling the new arch, RNGH should just work
  • Removed stuff referencing React <15 and RN <0.60 (what?)

Copy link
Member

@kacperkapusciak kacperkapusciak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow, what an improvement! 🎉 🔥

Comment on lines 77 to 79
### Automatic workletization of gesture callbacks

Reanimated's Babel plugin is setup in a way that automatically marks callbacks passed to gestures in the configuration chain as worklets. This means that as long as all your callbacks are defined in a single chain, you don't need to add a `'worklet';` directive at the beginning of the functions. Here is an example that will be automatically workletized:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 1aec22a

Comment on lines +103 to +109
```jsx
const callback = () => {
console.log(_WORKLET);
};
const gesture = Gesture.Tap();
gesture.onBegin(callback);
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should also write here that adding "worklet"; directive inside the function makes it work

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in aa06fa3

docs/docs/fundamentals/introduction.md Outdated Show resolved Hide resolved
docs/docs/fundamentals/installation.md Outdated Show resolved Hide resolved
docs/docs/fundamentals/installation.md Outdated Show resolved Hide resolved
docs/docs/fundamentals/installation.md Outdated Show resolved Hide resolved
@j-piasecki j-piasecki merged commit 56c3351 into main Dec 10, 2024
2 checks passed
@j-piasecki j-piasecki deleted the @j-piasecki/update-docs-intro branch December 10, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants