fixed docs on ReactElement that were out of sync with code
Oliver Zeigermann committed
Dec 16, 2015 at 11:26 UTC
20e5a95fe31b790618edbbe6c4c9b026364bd36f
1 file changed
+4
-2
src/isomorphic/classic/element/ReactElement.js
+4
-2
@@ -30,8 +30,10 @@ var RESERVED_PROPS = {
30
};
31
32
/**
33
- * Base constructor for all React elements. This is only used to make this
34
- * work with a dynamic instanceof check. Nothing should live on this prototype.
33
+ * Factory method to create a new React element. This no longer adheres to
34
+ * the class pattern, so do not use new to call it. Also, no instanceof check
35
+ * will work. Instead test $$typeof field against Symbol.for('react.element') to check
36
+ * if something is a React Element.
37
*
38
* @param {*} type
39
* @param {*} key