Volver a Preparación de EntrevistaReact esencial#64 · Preguntas adaptadas de sudheerj/reactjs-interview-questions (MIT)
How to combine multiple inline style objects?
🌐Traducción al español en progresoEl contenido detallado de esta lección aún se está traduciendo. Mientras tanto, se muestra en inglés.
You can use spread operator in regular React:
<button style={{ ...styles.panel.button, ...styles.panel.submitButton }}>
{"Submit"}
</button>
If you're using React Native then you can use the array notation:
<button style={[styles.panel.button, styles.panel.submitButton]}>
{"Submit"}
</button>
¿Qué tan bien recordaste esto?