Skip to content

Pressable style callback function and pressed state not working when I installed nativewind 4.0.36 #847

@glncy

Description

@glncy

Describe the bug
When using Pressable component in React Native, sometimes I use inline styles. In Pressable style prop, you can put a callback function to get the pressed state.

Upon installing nativewind, I noticed that the callback function is not working, even it will not put the rest of the inline styles you will put in callback funciton

To Reproduce
Steps to reproduce the behavior:

  1. Clone https://github.com/glncy/IssuesExpoApp
  2. Switch to branch bug/pressable-nativewind
  3. Install dependencies yarn install
  4. Run the app yarn run:[ios|android] ex. yarn run:ios
  5. The app will redirect to Screen
  6. When you press the Press Me button, it doesn't change. Also it doesn't apply the primary inline styles

Expected behavior
Pressable style callback funciton and pressed state should be working when using inline styles
Branch without Nativewind 4.0.36: bug/pressable-no-nativewind

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue-wipe-pre-v4If your issue persists in v4, open a new issue & reference this one in the description.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions