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

Documentation wrongly suggests using motion.create for custom components #2796

Open
vincentreynaud opened this issue Sep 11, 2024 · 1 comment
Labels
feature New feature or request

Comments

@vincentreynaud
Copy link

vincentreynaud commented Sep 11, 2024

The current Framer documentation suggests to create custom components in the following way:

const Component = React.forwardRef((props, ref) => (
    <div ref={ref} />
))

const MotionComponent = motion.create(Component);

when in fact one should use this, at least for the latest packages.

const MotionComponent = motion(Component);

Took me a bit to find out after encountering a few stack overflow issues.

Please fix the docs of an otherwise amazing library 🙏

@vincentreynaud vincentreynaud added the feature New feature or request label Sep 11, 2024
@vincentreynaud vincentreynaud changed the title Framer documentation suggests using motion.create for custom components Documentation suggests using motion.create for custom components Sep 11, 2024
@vincentreynaud vincentreynaud changed the title Documentation suggests using motion.create for custom components Documentation wrongly suggests using motion.create for custom components Sep 11, 2024
@mattgperry
Copy link
Collaborator

Did you try motion.create and it wasn't working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants