Closed maknom66 closed 4 years ago
Oops, my bad, i thought i wasn't mutating, but i was, changed the code and now it's working
updated snippet
onTapCard={(index) => {
let data = [...this.state.data, {}]
this.setState({ getDetails: !this.state.getDetails, data })
}}
can you help me ? i didn't still add new cards
can you help me ? i didn't still add new cards
Were you able to fix issue of getting dynamic data
So, what i want is to increase the height and width of card when pressed, which requires rerender of the cards. However, I am unable to do it, even though i have tried to change the contents of cards which is suppose to call the renderCards. I am doing it inside onTapCard prop:
onTapCard={(index) => {
newData = this.state.data
newData.push({})
this.setState({ getDetails: !this.state.getDetails, data: newData })
}}
the state variable getDetails is what i using to know if a card was tapped