Skip to content

withUniwind: Custom mapping overrides default className and style merging #336

@ycmjason

Description

@ycmjason

What happened?

When no custom mapping is provided, the wrapped component will merge className and style as expected.

But when when custom mapping is provided, there seems to be no way to replicate this merging behaviour?

Steps to Reproduce

  1. call withUniwind on some component providing custom mapping (or not)
  2. Try to provide className and style together

If custom mapping is not provided, observe that className and style are merged.
If custom mapping is provided, (with className -> style mapping), style gets ignored.
If custom mapping is provided, (without className -> style mapping), className does not exist in the wrapped component, even provided is ignored.

Snack or Repository Link

https://github.com/ycmjason/uniwind-playground/tree/reproduction-with-unistyles

Uniwind version

1.0.5

React Native Version

0.81.5

Platforms

Android, iOS

Expo

Yes

Additional information

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