You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Why can i not animate from an array that is created in the component?
Why does this work.
...
const test = [{name: "dd"}, {name: "ddddd"}, {name: "dd"}]
const MainMenuPage = () => {
const transitions = useTransition(test, test => test.name, {
from: { transform: 'translate3d(0,-40px,0)' },
enter: { transform: 'translate3d(0,0px,0)' },
leave: { transform: 'translate3d(0,-40px,0)' },
})
....
But not this ?
const MainMenuPage = () => {
const transitions = useTransition(test, test => test.name, {
from: { transform: 'translate3d(0,-40px,0)' },
enter: { transform: 'translate3d(0,0px,0)' },
leave: { transform: 'translate3d(0,-40px,0)' },
})
const test = [{name: "dd"}, {name: "ddddd"}, {name: "dd"}]
....
I wanted to render an array from a api call in use effect, but .. no. how do i animate and array from api calls, ?
Beta Was this translation helpful? Give feedback.
All reactions