Skip to main content
InterviewHubPRO
Section Overview
Q63

Question 63 of 407

General

15%
React Core & Hooks (407 Qs)•General

How to combine multiple inline style objects?

mid LevelCode ExamplereactGeneral

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>