ReactNativeSchool / react-native-flatlist-demo

228 stars 125 forks source link

About Flatlist #2

Closed URvesh109 closed 5 years ago

URvesh109 commented 7 years ago

Your flatlist tutorial help me lot it was awesome. I am having query regarding flatlist. If you will provide any suggestion I will be much obliged.

Query I have Flatlist which has n-number of buttons, when a user click on any button then that specific button should change its styling.

7laria commented 6 years ago

you need to create the button as separate component and then set different style based on selected props. for example: `... export default class MyButton extends Component{ render(){

} export const style=StyleSheet.create({ styleSelected:{ your style here}, styleDeselected:{ your style here} })`