Skip to content

Instantly share code, notes, and snippets.

@koss-lebedev
Created October 11, 2019 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koss-lebedev/237c451001f04dd5f5cae0544a7a9768 to your computer and use it in GitHub Desktop.
Save koss-lebedev/237c451001f04dd5f5cae0544a7a9768 to your computer and use it in GitHub Desktop.
import { animated, useSpring } from "react-spring";
const App = () => {
const style = useSpring({
from: {
transform: "rotateY(0deg)"
},
transform: "rotateY(25deg)"
});
return (
<>
<div className="container">
{movies.map(src => (
<animated.div
key={src}
className="card"
style={{
...style,
backgroundImage: `url(${src})`
}}
/>
))}
</div>
</>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment