Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deduplicate "unknown prop" warning to ease pain of version updates
Some widely used libraries which depend on React have used syntax that ends up passing non-standard props to default React components like 'dom' and 'div'. For example: ``` // where this.props contains attributes like 'foo' return <div {...this.props} />; ``` Since we started throwing warnings for this syntax in Reactv15.2 some libraries have not upgraded past v15.2. Now, because of deprecations in 15.5, some libraries will only work with Reactv15.5, and this causes a conflict when other libraries are pinned at v15.1. The overall effect is that either there are version conflicts or the "unknown prop" warning is thrown all over the place, and users of these libraries can't fix the warnings. See facebook#9466 for more context. We are deduping this warning in hopes that it allows more library authors to update to the latest version of React. React v16.0 may take a different approach to this issue. For some related discussion, see facebook#9477 **Test Plan:** - Added a unit test - Manually tested with a fixture that was not committed; https://gist.github.com/flarnie/db011bf54206f30b9983cd4dc674c82e
- Loading branch information