motiondivision / motion

A modern animation library for React and JavaScript
https://motion.dev
MIT License
25.95k stars 851 forks source link

[DOCS] LazyMotion page has incorrect variable name #2780

Closed mattmischuk closed 2 months ago

mattmischuk commented 3 months ago

Explanation

Incorrect variable name in docs

Steps to reproduce

  1. Go to https://www.framer.com/motion/lazy-motion/
  2. Navigate to Props
  3. See example

Expected behaviour

 // features.js
-import { domAnimations } from "framer-motion"
-export default domAnimations
+import { domAnimation } from "framer-motion"
+export default domAnimation

 // index.js
 import { LazyMotion, m } from "framer-motion"

6. Video or screenshots

image
sheikhevan commented 2 months ago

nevermind it isn't fixed yet, anyone know how to edit docs?

mattgperry commented 2 months ago

Publishing a fix now, thanks!

mattmischuk commented 2 months ago

@mattgperry I think you did the opposite; it's meant to be domAnimation not the plural form. See const name in dist. https://github.com/framer/motion/blob/5619d5644ffe3d22cb523c54d4b36cf5fec26f60/packages/framer-motion/src/render/dom/features-max.ts#L10

mattmischuk commented 1 month ago

@mattgperry hey is the docs open source? Can I contribute the fix?

vladstudio commented 1 month ago

Yeah please replace domAnimations with domAnimation at https://www.framer.com/motion/guide-reduce-bundle-size/