Update introduction and installation pages in the documentation#3274
Merged
j-piasecki merged 9 commits intomainfrom Dec 10, 2024
Merged
Update introduction and installation pages in the documentation#3274j-piasecki merged 9 commits intomainfrom
j-piasecki merged 9 commits intomainfrom
Conversation
kacperkapusciak
approved these changes
Dec 10, 2024
Member
kacperkapusciak
left a comment
There was a problem hiding this comment.
wow, what an improvement! 🎉 🔥
docs/docs/guides/troubleshooting.md
Outdated
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: |
Member
There was a problem hiding this comment.
i think it could be useful to give people links to concepts like:
workletization
https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#to-workletize
reanimated babel plugin
https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#reanimated-babel-plugin
Comment on lines
+103
to
+109
| ```jsx | ||
| const callback = () => { | ||
| console.log(_WORKLET); | ||
| }; | ||
| const gesture = Gesture.Tap(); | ||
| gesture.onBegin(callback); | ||
| ``` |
Member
There was a problem hiding this comment.
you should also write here that adding "worklet"; directive inside the function makes it work
Co-authored-by: Kacper Kapuściak <[email protected]>
Co-authored-by: Kacper Kapuściak <[email protected]>
Co-authored-by: Kacper Kapuściak <[email protected]>
Co-authored-by: Kacper Kapuściak <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Update introduction page:
Updated installation page: