Skip to content

Conversation

@NikhilMasurkar
Copy link
Contributor

Description

Fixes the TypeError: Property 'ref' is not configurable error that occurs when using this library with React Native 0.82+ and the new architecture (Fabric) enabled.

Changes

  • Replaced delete operations with object destructuring in the linkify method
  • Replaced delete operations with object destructuring in the parse method

Problem

The library was attempting to delete the ref property from component props, which is not allowed in React Native's new architecture as the ref property is non-configurable.

Solution

Instead of mutating props by deleting ref and key, we now use object destructuring to create a new object without these properties:

const { ref: _ref, key: _key, ...componentProps } = component.props || {};

Testing

  • ✅ Tested with React Native 0.82.1 with new architecture enabled
  • ✅ Backward compatible with older React Native versions
  • ✅ No breaking changes to existing API

Fixes

Closes #85

@obipawan obipawan merged commit 48ac1b4 into obipawan:master Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Property 'ref' is not configurable" error with React Native 0.82+ (New Architecture)

3 participants