Skip to content

Automatically Object.assign when styles receives an Array #3081

@appsforartists

Description

@appsforartists

In React Native, these two styles are automatically composed:

<Text style={[styles.ratingValue, getStyleFromScore(criticsScore)]}>

Currently, trying a similar technique in React DOM produces this:

<span style="0:[object Object];1:[object Object];">

Following the principles of "Learn Once, Write Everywhere", the style prop should behave similarly across implementations.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions