spread operator merge two styles code example
Example 1: merge properties of object typescript
const target = { a: 1, b: 2 };
const source = { b: 4, c: 5 };
// Copies source to target object without changing
// target object instance
const returnedTarget = Object.assign(target, source);
Example 2: multiple styling react native
style={[
styles.button,
{ backgroundColor: 'green' }
]}