L
L
Leonid Rozhentsev2021-05-23 18:14:27
React Native
Leonid Rozhentsev, 2021-05-23 18:14:27

How to style active element in React Native?

In general, the essence of the problem is this: you need to style the element in the active state. At first I used the styled-components library and styled it through props, but then I decided to do it through the usual StyleSheet, but I need to style it differently there. Here's how, I couldn't find it anywhere.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Makarov, 2021-07-05
@kirbi1996

You set styles to the array style={[myState ? styles.oneStyle : styles.anotherStyle]}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question