This repository was archived by the owner on Dec 16, 2021. It is now read-only.
Another prop-types lib solution#359
Merged
Merged
Conversation
developit
reviewed
Apr 14, 2017
| "preact-render-to-string": "^3.6.0", | ||
| "preact-transition-group": "^1.1.0", | ||
| "proptypes": "^0.14.3", | ||
| "prop-types": "^15.5.8", |
Member
There was a problem hiding this comment.
Thought: maybe this should be a peer dependency now?
Contributor
Author
There was a problem hiding this comment.
Up to you, but the prop-types docs recommends leaving it here ¯_(ツ)_/¯
https://github.com/reactjs/prop-types/#how-to-depend-on-this-package
developit
reviewed
Apr 14, 2017
| if (err) console.error(new Error(err.message || err)); | ||
| } | ||
| } | ||
| PropTypes.checkPropTypes(propTypes, props, 'prop', displayName); |
Member
There was a problem hiding this comment.
Ah - this is how they want us to validate! That makes more sense.
developit
approved these changes
Apr 15, 2017
Member
|
@DonnieWest @conceptualitis - which PR do you guys think we should merge? The implementation appears to be roughly the same between the two, mainly tests differing. |
Member
|
I'll merge this for now, but there's also documentation in @DonnieWest's PR we'll want too. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I goofed up and totally missed that @tkh44 (#352) and @DonnieWest (#351) were already working on this when I started looking at #358.
The big differences here are
prop-typesspits outFooin the test, which had to be done because somewhere in the code the I think FB guards against spitting out the sameconsole.errormessage multiple times. Meaning the variable names have to be different.Let me know what you all think.