Skip to content

[BUG] SearchInput breaks in combination with react-native-worklets > 0.5.1 #61

Description

@rolandschuetz

Hello,

it seems that the nativewind UI is not compatible with react-native-worklets > 0.5.1

When I use it with "react-native-worklets": "^0.6.1", I get this error from measure in SearchInput.ios.tsx:

    at _measure (native)```

```SearchInput.ios.tsx
const rootStyle = useAnimatedStyle(() => {
        if (_WORKLET) {
            // safely use measure
            const measurement = measure(animatedRef);
            return {
                paddingRight: showCancelDerivedValue.value
                    ? withTiming(measurement?.width ?? cancelText.length * 11.2)
                    : withTiming(0),
            };
        }
        return {
            paddingRight: showCancelDerivedValue.value
                ? withTiming(cancelText.length * 11.2)
                : withTiming(0),
        };
    });

Does anyone understand the issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions