score:10
documentation propagation section (https://www.framer.com/api/motion/animation/#propagation) says that
if a motion component has children, changes in variant will flow down through the component hierarchy. these changes in variant will flow down until a child component defines its own animate property.
you have to remove the animate
prop from img
elements.
score:4
if you set an animation on your child, your parent won't pass it's animation logic to it. thus you have to remove the initial
and animate
property from you <img>
component:
<img
src="https://picsum.photos/200/200"
variants={imgvariants}
/>
you can look at this example from the official docs for a reference: https://www.framer.com/api/motion/types/#orchestration.when
Source: stackoverflow.com
Related Query
- Transition when doesn't work in Framer Motion
- Framer Motion dynamic variants don't work when modifying initial properties
- Framer Motion - Opacity transition works in development, but not when deployed
- Framer motion animate when element is in-view (When you scroll to element)
- Why the input doesnt work when generated by React
- When I try to setState in useEffect it doesnt work
- React Router when passed param doesnt work
- Exit transition not triggered in Framer Motion for React components rendered in Array.map() (or conditionally)
- React Framer Motion in-between color transition
- Override the transition delay in React Framer Motion
- How do you transition framer motion values?
- React & Framer Motion - Removing from list causes initial animation to play when map returns a component
- React-sortable-hoc transition doesnt work
- Framer Motion AnimatePresence doesn't execute when changing routes
- Animation when I change a locale - framer motion
- React Router doesnt work when I try to render the components
- react framer motion animate only when button is pressed
- Framer Motion - use different durations on transition properties
- setState doesnt work when using object which has been copied from spread operator
- Framer motion - How to do a simple css color transition
- form.validateFields() doesnt work when we have custom antd form component
- React Hooks doesnt work between routes but works when refreshing
- Routing via browserHistory when using hashHistory doesnt appear to work
- Framer motion modal - Animate presence does not work
- I cant use framer motion when using <navigate/> react router dom v6 to auth my login page
- when i do destructuring to initialize multiple variables via use state hook code works but it doesnt work when i do object destructuring
- Page transition animation in framer motion (React)
- How to fix "Parsing Error" when adding the <motion.div /> element in React / Framer motion
- React-router URLs don't work when refreshing or writing manually
- React Router work on reload, but not when clicking on a link
More Query from same tag
- how to click on h1 header to navigate to component?
- TypeError: _this.props.onUpdateShelf is not a function | React | Classbased component
- Handle a custom component using React Hook Forms and React Table
- react redux hash based routing
- Format Date momentjs
- NextJS - Unexpected token < in JSON at position 0
- Spring Boot war or jar for rest api project
- Dynamically created svg paths from geojsons are not rendering to a ref
- how do I pass additional props into a react component through a higher order function
- Unexpected token '.' when run create-react-app
- What's React's "$emit" as in Angular world
- how to fix uri undefined error when trying to send request
- Using react-leaflet-geosearch in React Leaflet: cannot read property addControl
- How to reset the timer properly in react js
- GatsbyJS: createPage skip pages in WordPress reading settings
- I am passing body in payload to a POST method, which are selected filters. Is this possible to now send any array category if it is empty
- Unexpected outcome with merging react state
- Regarding LifeCycles in ReactJS / Problem in the code snippet
- I can not get the state from react router Link component using useLocation. So how can I pass it?
- set State doesn't update the value
- Last letter not getting set while onChange event
- React Router V4 - Can't get URL params in props
- Is it possible to run React.js debugger in editor than in web browser
- Context.Consumer source value map not rendering any element
- "Error: You may not call store.getState() while the reducer is executing."
- Reactjs - Demo Application is not working
- React (+ Typescript) component not rerendering upon updating Context
- Keep code DRY on create/edit form
- How to use default bootstrap class with styled-components?
- Refresh page after and call a function automatically in react