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

Adding motion.create() #2787

Merged
merged 5 commits into from
Sep 4, 2024
Merged

Adding motion.create() #2787

merged 5 commits into from
Sep 4, 2024

Conversation

mattgperry
Copy link
Collaborator

In this PR we added a new entrypoint for motion components that's compatible with React Server Components.

The issue with import * as x is you remove the ability to support Proxy or other dynamically-assigned objects so the pattern of supporting motion(Component) and motion.div breaks.

This PR deprecates motion(Component) in favour of motion.create(Component)

Copy link
Contributor

@kurtextrem kurtextrem left a comment

Choose a reason for hiding this comment

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

Makes perfect sense to me!

@mattgperry mattgperry merged commit 5ae3495 into main Sep 4, 2024
1 check passed
@mattgperry mattgperry deleted the feature/motion-create branch September 4, 2024 08:45
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