Skip to content

Commit 20e5a95

Browse files
committed
fixed docs on ReactElement that were out of sync with code
1 parent 6c8cbca commit 20e5a95

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/isomorphic/classic/element/ReactElement.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ var RESERVED_PROPS = {
3030
};
3131

3232
/**
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.
3537
*
3638
* @param {*} type
3739
* @param {*} key

0 commit comments

Comments
 (0)