chenglou / react-motion

A spring that solves your animation problems.
MIT License
21.68k stars 1.16k forks source link

Reopen: Warning: Failed propType: Invalid prop 'styles' supplied to 'TransitionMotion'. #359 #367

Open shruti-prasad opened 8 years ago

shruti-prasad commented 8 years ago

I am unable to resolve this issue with the solution given to me. My styles object is an array of objects and i have tried replicating the same type of styles as given in the example. I am still unable to resolve the warning.

chenglou commented 8 years ago

Can you give a more specific example?

shruti-prasad commented 8 years ago

Hi, The styles I am providing happens to be an array of objects. I even tried representing the styles in the same format as the example in the link that was provided as my previous solution to no avail. I still receive the same warning.

Thanks Shruti

From: Cheng Lou [mailto:notifications@github.com] Sent: Monday, September 12, 2016 11:53 AM To: chenglou/react-motion react-motion@noreply.github.com Cc: Shruti Prasad shprasad@adobe.com; Author author@noreply.github.com Subject: Re: [chenglou/react-motion] Reopen: Warning: Failed propType: Invalid prop 'styles' supplied to 'TransitionMotion'. #359 (#367)

Can you give a more specific example?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/chenglou/react-motion/issues/367#issuecomment-246259237, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AUBEj-FUALeyux9TI2ac7bOajYQxQDMRks5qpO_egaJpZM4J2pMD.

chenglou commented 8 years ago

TransitionMotion takes in an object, not an array. You need to turn it into an object of key => whateverValue.

Also, you're animating things that mount & unmount right?

shruti-prasad commented 8 years ago

I have mapped an array of objects with a unique key to transition motion, hence it takes in an object at each iteration. I am animating things that mount and unmount.

From: Cheng Lou [mailto:notifications@github.com] Sent: Monday, September 12, 2016 11:58 AM To: chenglou/react-motion react-motion@noreply.github.com Cc: Shruti Prasad shprasad@adobe.com; Author author@noreply.github.com Subject: Re: [chenglou/react-motion] Reopen: Warning: Failed propType: Invalid prop 'styles' supplied to 'TransitionMotion'. #359 (#367)

TransitionMotion takes in an object, not an array. You need to turn it into an object of key => whateverValue.

Also, you're animating things that mount & unmount right?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/chenglou/react-motion/issues/367#issuecomment-246259845, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AUBEj2fJ1QlZ64rr8_vkUd-JrzPXMqCWks5qpPEAgaJpZM4J2pMD.