Fix ambiguity in doc comment for isValidElement (#12826)
`isValidElement(object)` checks if object is a ReactElement. `@return {boolean} True if `object` is a valid component.` leading to confusion which was described in several blog posts: - https://reactjs.org/blog/2015/12/18/react-components-elements-and-instances.html - https://medium.com/@fay_jai/react-elements-vs-react-components-vs-component-backing-instances-14d42729f62
Alexey committed
Aug 3, 2018 at 07:32 UTC
15a8f031838a553e41c0b66eb1bcf1da8448104d
1 file changed
+1
-1
packages/react/src/ReactElement.js
+1
-1
@@ -365,7 +365,7 @@ export function cloneElement(element, config, children) {
365
* Verifies the object is a ReactElement.
366
* See https://reactjs.org/docs/react-api.html#isvalidelement
367
* @param {?object} object
368
- * @return {boolean} True if `object` is a valid component.
368
+ * @return {boolean} True if `object` is a ReactElement.
369
* @final
370
*/
371
export function isValidElement(object) {