Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if manager is not null for update and unmount and fix the doc #995

Merged
merged 4 commits into from
Apr 18, 2019
Merged

Check if manager is not null for update and unmount and fix the doc #995

merged 4 commits into from
Apr 18, 2019

Conversation

Taym95
Copy link
Collaborator

@Taym95 Taym95 commented Apr 15, 2019

Fix #991

@callstack-bot
Copy link

callstack-bot commented Apr 15, 2019

Hey @Taym95, thank you for your pull request 🤗. The documentation from this branch can be viewed here. Please remember to update Typescript types if you changed API.

@Taym95 Taym95 mentioned this pull request Apr 17, 2019
@Taym95 Taym95 changed the title Check if manager is not null for update and unmount Check if manager is not null for update and unmount and fix the doc Apr 17, 2019
@@ -26,10 +26,26 @@ export default class PortalConsumer extends React.Component<Props> {
}

componentDidUpdate() {
if (!this.props.manager) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please extract this condition to separate class method? Do not forget to prefix the name with _ as it is a private method and place it before just before render function. Thank you for the PR!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or extract just error throwing. Decide what will be better for readability.

@jayu jayu merged commit 901745b into callstack:master Apr 18, 2019
iyadthayyil pushed a commit to iyadthayyil/react-native-paper that referenced this pull request Jun 6, 2019
…ix the modal doc example (callstack#995)

* fix(portal): check if a portal manager is not null for update and unmount

* docs(portal): fix Modal example
Trancever pushed a commit that referenced this pull request Jun 27, 2019
…ix the modal doc example (#995)

* fix(portal): check if a portal manager is not null for update and unmount

* docs(portal): fix Modal example
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.

Modal Snack Is Broken
3 participants