Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

proptypes render Error

See original GitHub issue

hey guys i added this package in a pure react-native project that created by react-native-cli . and after run i get this error ! in android and IOS

undefined is not an object (evaluating ‘_reactNative.Text.prototype.render’)

simulator screen shot - iphone 6 - 2018-10-11 at 10 35 55

this is my app Code:

`import React, { Component } from “react”; import { Platform, StyleSheet, Text, View } from “react-native”; import { setCustomView, setCustomTextInput, setCustomText, setCustomImage, setCustomTouchableOpacity } from “react-native-global-props”;

const customTextProps = { style: { fontSize: 20, fontFamily: Platform.OS === “ios” ? “HelveticaNeue” : “Roboto”, color: “red” } };


const instructions ={ ios: “Press Cmd+R to reload,\n” + “Cmd+D or shake for dev menu”, android: “Double tap R on your keyboard to reload,\n” + “Shake or press menu button for dev menu” });

export default class App extends Component { render() { return ( <View style={styles.container}> <Text style={styles.welcome}>Welcome to React Native!</Text> <Text style={styles.instructions}>To get started, edit App.js</Text> <Text style={styles.instructions}>{instructions}</Text> </View> ); } } `

and package.json:

"dependencies": { "prop-types": "^15.6.2", "react": "16.5.0", "react-native": "0.57.0", "react-native-global-props": "^1.1.4" }, "devDependencies": { "babel-jest": "23.6.0", "jest": "23.6.0", "metro-react-native-babel-preset": "0.48.0", "react-test-renderer": "16.5.0" }

Any one know the solution?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

Balasnestcommented, Oct 12, 2018

@mr-riiim It works after changing to this in package.json. "react-native-global-props": "Ajackster/react-native-global-props#master", @Ajackster I guess some problem with update. Please look into it.

raminrezcommented, Oct 11, 2018

I find a fix been added for this error on commit dd3f676 , still i don’t have this fix with npm install .

i’m using version 1.1.4 , but in node_modules , react-native-global-props packages , did’t get changes !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typechecking With PropTypes - React
PropTypes exports a range of validators that can be used to make sure the data you receive is valid. In this example, we're...
Read more >
How to validate React props using PropTypes - LogRocket Blog
Learn how to validate props with React PropTypes, React's internal mechanism for adding type checking to component props.
Read more >
How to throw error instead of warning from proptypes in ...
The official way is to implement an ErrorBoundary , catch the error, and render a specific UI element for it. Error boundaries are...
Read more >
How to forget about type errors in your React props with ...
In this article, we will be looking at how to making your debugging process faster with prop types in React, what they are,...
Read more >
PropTypes functional type errors do not stop rendering #25
When using the functional form of propTypes to do some conditional prop checking, errors result in a warning printed but do not prevent ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found