Skip to content

transform style property missing string type #37543

Description

@nmccrea

Description

As part of the incredible effort to move RN APIs towards web APIs, the transform style property was updated to support strings. However, the string type has not been added for this property.

react-native-web has now deprecated all other forms of this prop, so using the old array syntax produces a console warning:

Screenshot 2023-05-23 at 12 31 37 PM

But updating the syntax produces a type error:

Screenshot 2023-05-23 at 12 32 50 PM

React Native Version

0.71.6

Output of npx react-native info

System:
Binaries:
Node: 18.6.0 - ~/.nvm/versions/node/v18.6.0/bin/node
Yarn: Not Found
npm: 9.1.2 - ~/.nvm/versions/node/v18.6.0/bin/npm
Watchman: 2022.11.14.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: Not Found
SDKs:
iOS SDK:
Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
Android SDK: Not Found
IDEs:
Android Studio: 2021.1 AI-211.7628.21.2111.8309675
Xcode: 14.3/14E222b - /usr/bin/xcodebuild
Languages:
Java: 11.0.17 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0 react-native: ^0.71.6 => 0.71.6 react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found

Steps to reproduce

Use the string syntax for the transform style property in a TypeScript project.

Snack, code example, screenshot, or link to a repository

Attached above

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