InterviewHubPRO
Section Overview
Q63

Question 63 of 445

Part 1: Core React, JSX & Component Architecture (1 - 77)

14%
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>