Skip to content

Use of deprecated react feature causes "TypeError: Cannot read properties of undefined (reading 'node')" when using React v15.5.0 and later #6

@doublethefish

Description

@doublethefish

Repo:

  1. In a new (instructions) or existing react-native app.
  2. Ensure that you are using react 15.5.0 or later (reason)
  3. Install react-native-components-viewer: npm install --save react-native-components-viewer
  4. Add the react-native-components-viewer import to App.js/tsx or any component. import ComponentsViewer from 'react-native-components-viewer';
  5. When the component that imports ComponentViewer is rendered the app will error with either TypeError: Cannot read properties of undefined (reading 'node') or Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication).

Root-cause:

This appears to be caused by PropTypes being moved from react to the community supported prop-types library.

Fix:

Port to the prop-type library. See PR #5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions