From 20e5a95fe31b790618edbbe6c4c9b026364bd36f Mon Sep 17 00:00:00 2001 From: Oliver Zeigermann Date: Wed, 16 Dec 2015 11:26:32 +0100 Subject: [PATCH] fixed docs on ReactElement that were out of sync with code --- src/isomorphic/classic/element/ReactElement.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/isomorphic/classic/element/ReactElement.js b/src/isomorphic/classic/element/ReactElement.js index 655b9aa881..e95941846c 100644 --- a/src/isomorphic/classic/element/ReactElement.js +++ b/src/isomorphic/classic/element/ReactElement.js @@ -30,8 +30,10 @@ var RESERVED_PROPS = { }; /** - * Base constructor for all React elements. This is only used to make this - * work with a dynamic instanceof check. Nothing should live on this prototype. + * Factory method to create a new React element. This no longer adheres to + * the class pattern, so do not use new to call it. Also, no instanceof check + * will work. Instead test $$typeof field against Symbol.for('react.element') to check + * if something is a React Element. * * @param {*} type * @param {*} key