As in react we can inspect element, see class applied to element and dynamically change css properties and can see in UI.Like wise do we have anything in react native?Tried react-devtools but tried to change css property value but that is not reflecting in UI.
Asked
Active
Viewed 297 times
0
-
you just need to look at the properties of CSS in react-devtool and change any property press enter and property will be applied. – Waheed Akhtar Apr 26 '20 at 13:19
1 Answers
0
Well you have your style property and you can set a function.
<SomeComponent style={this.styleDefiningMethod()} ... />
styleDefiningMethod () { // pass a parameter that you want to be change in you style like let styleChange
return {
//your style definition e.g. background: '#ff00ff'
}
}
Inside of your styleDefiningMethod
you can add some logic based on your state or on parameter.

Murmeltier
- 595
- 5
- 10