question-mark
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.

Failed prop type: The prop `children` is marked as required in `ReactNativeModal`, but its value is `undefined`

See original GitHub issue

I pasted the code from react-native-modal example into my own. I’m not sure why when I click the button, I get a warning “Failed prop type: The prop children is marked as required in ReactNativeModal, but its value is undefined” and the modal does not show. The example code works on its own but not in my code.

The warning is shown at <Modal isVisible={this.state.visibleModal === 1}>{this._renderModalContent()}</Modal>

Please see attached for code. modal_no_work.txt

Warning thrown at line 111

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
ancyrwebcommented, Apr 26, 2019

Temporary fix :

<Modal>
    <View>{ this.props.selectedParking ? this.renderModalContent() : null }</View>
</Modal>
4reactions
jerryheircommented, Mar 15, 2018

@VanessaChu , Please how did you get to solve the problem… I’m facing the same thing

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed prop type: The prop `children` is marked as required in ...
Failed prop type: The prop children is marked as required in ReactNativeModal , but its value is undefined #100.
Read more >
The prop `children` is marked as required in `Button`, but its ...
I am trying to convert an older Material UI implementation. The Docs are bit laggy. I get this error. The docs say. Name...
Read more >
Failed Prop Type The Prop Is Marked As Required But Its ...
the button I get a warning Failed prop type: The prop children is marked as required in ReactNativeModal but its value is undefined....
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 >
The prop `store.subscribe` is marked as required-Reactjs
How to fix this issue “Warning: Failed prop type: The prop `title` is marked as required in `Tab`, but its value is `undefined`.”...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found