Skip to content

Reanimated builders support - #54

Merged
WillsonHaw merged 4 commits into
mainfrom
reanimated-builders-support
Aug 12, 2025
Merged

Reanimated builders support#54
WillsonHaw merged 4 commits into
mainfrom
reanimated-builders-support

Conversation

@WillsonHaw

Copy link
Copy Markdown
Contributor

This adds support for animation builders in react-native. Eg:

const  MyComponent = () => {
  return <Animated.View
    entering={FadeIn.duration(1000)}
    exiting={FadeOut.duration(1000)}
  />
}

See the storybook for examples. I haven't added every builder from reanimated (Bounce, Spin, etc). Just Slide and Fade for now.

@WillsonHaw
WillsonHaw requested a review from m-hall August 11, 2025 19:57
@WillsonHaw WillsonHaw self-assigned this Aug 11, 2025
@WillsonHaw
WillsonHaw force-pushed the reanimated-builders-support branch from 9cb24a7 to d9220ee Compare August 11, 2025 20:19
if (this._deferNodeRemovalHandler) {
this._deferNodeRemovalHandler(() => {
this.emit('deferredDestroyComplete');
});

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Main thing to look at here. I hate having to do this, but we need to delay removal of the lightning node and all child nodes so that the element can be animated out. Open to better suggestions here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No I think this makes sense. Can't animate the element if the element no longer exists.

@@ -0,0 +1,3 @@
## @plextv/react-lightning-plugin-reanimated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
## @plextv/react-lightning-plugin-reanimated
## react-lightning-plugin-reanimated

?
You seem to have been removing it everywhere else, so should you do the same here? or have I misunderstood?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I only removed it for storybook, just for display purposes

}

break;
case 'scale':

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we also be handling scaleX and scaleY directly as well, like you do for translate?

@m-hall m-hall left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I haven't had a chance to test it, but I'm approving it to unblock you as I will be away

@WillsonHaw
WillsonHaw merged commit 2968a78 into main Aug 12, 2025
1 check passed
@WillsonHaw
WillsonHaw deleted the reanimated-builders-support branch August 12, 2025 21:27
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