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

Changed proptypes in PlaceholderCommon #170

Merged
merged 1 commit into from Apr 2, 2019
Merged

Changed proptypes in PlaceholderCommon #170

merged 1 commit into from Apr 2, 2019

Conversation

@Jeffrey-Zutt
Copy link

@Jeffrey-Zutt Jeffrey-Zutt commented Apr 2, 2019

Description

Changed proptypes of missingComponentComponent and errorComponent to PropTypes.func in
packages/sitecore-jss-react/src/components/PlaceholderCommon.tsx

Motivation

Whenever the following JSX is used:

<Placeholder 
   missingComponentComponent={MissingComponentComponent} 
   errorComponent={ErrorComponent}  {...placeholderProps} 
/>

The following warning will occur:

Warning: Failed prop type: Invalid prop `missingComponentComponent` of type `function` supplied to `PlaceholderComponent`, expected `object`.

This PR will stop that warning from showing

How Has This Been Tested?

I've changed the proptypes and made sure the warning did not show up in my browser-console.

Browser: Chrome Version 73.0.3683.86 (Official Build) (64-bit)
OS: OSX

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have read the Contributing guide.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
aweber1
aweber1 approved these changes Apr 2, 2019
@aweber1 aweber1 merged commit ef75a78 into Sitecore:dev Apr 2, 2019
1 check passed
Loading
@aweber1
Copy link
Contributor

@aweber1 aweber1 commented Apr 2, 2019

Thanks for the contribution!

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants