React & Modern Frontend (445 Qs)•Part 1: Core React, JSX & Component Architecture (1 - 77)
How to combine multiple inline style objects?
You can use spread operator in regular React:
jsx
<button style={{ ...styles.panel.button, ...styles.panel.submitButton }}>
{"Submit"}
</button>
If you're using React Native then you can use the array notation:
jsx
<button style={[styles.panel.button, styles.panel.submitButton]}>
{"Submit"}
</button>