Created
March 20, 2019 02:52
-
-
Save iskenxan/4bcdb5cf46cfb1b4b241979a4b361ef9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addCard = (y) => { | |
const { cards } = this.state; | |
const newStack = [...cards]; | |
const style = { ...styles.dropCard }; | |
style.top = y; | |
const card = ( | |
<view key="{y}" style="{style}"> | |
<text>Sample</text> | |
</view> | |
) | |
newStack.push(card); | |
this.setState({ cards: newStack }) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment