Skip to content

withUniwind does not copy static properties like Image.prefetch() #618

Description

@bradleyayers

What happened?

When creating a HOC using withUniwind it would be convenient if it copied across the static properties too, so that the original unwrapped component doesn't need to also be imported to use them.

Steps to Reproduce

import { Image } from "expo-image";

const StyledImage = withUniwind(Image);

Image.prefetch("…") // exists
StyledImage.prefetch("…") // does not exist
Image

Snack or Repository Link

https://github.com/bradleyayers/uniwind-withuniwind-warning/tree/copy-static-properties

Uniwind version

1.10.0

React Native Version

0.86.0

Platforms

Web

Expo

Yes

Additional information 〰

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions