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

Conversation

@Jeffrey-Zutt
Copy link

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.

@Jeffrey-Zutt Jeffrey-Zutt force-pushed the Jeffrey-Zutt:dev branch from 67b2119 to 4a4aca3 Apr 2, 2019

Jeffrey Zutt

@Jeffrey-Zutt Jeffrey-Zutt force-pushed the Jeffrey-Zutt:dev branch from 4a4aca3 to afb1b5b Apr 2, 2019

@aweber1

aweber1 approved these changes Apr 2, 2019

@aweber1 aweber1 merged commit ef75a78 into Sitecore:dev Apr 2, 2019

1 check passed

Sitecore.jss Build #20190402.3 succeeded
Details
@aweber1

This comment has been minimized.

Copy link
Member

commented Apr 2, 2019

Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.