react native dynamic style

Solutions on MaxInterview for react native dynamic style by the best coders in the world

showing results for - "react native dynamic style"
Elyne
25 Jun 2020
1//you can use a function to generate a styleSheet dynamically
2styleFunction (option) {
3  return {
4    borderWidth: 2,
5    margin: option,
6  }
7}
8
9<View style={this.styleFunction(15)}>
10	//things
11</View>