Extract out styles/animations hooks #2411
Unanswered
jaexplorer
asked this question in
Q&A
Replies: 1 comment
-
I started creating custom hooks that return needed things (animated style, some shared value, etc). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, for my components I always follow this folder structure:
MyComponent.tsx
MyComponentStyles.ts
MyComponentConstants.ts
MyComponentUtils.ts
For reanimated hooks such as useSharedValue, useGestureHandler, useAnimationStyles. I like to isolate/decouple out those hooks out of MyComponent.tsx so the file doesn't get so overwhelming with animation logic and simply import instead. What is the best approach for this?
Beta Was this translation helpful? Give feedback.
All reactions