This is currently used by both isomorphic and the renderer. I think that we can probably split these up. The isomorphic type should actually be different. It has to do with that the caller needs to know exactly which type of element it is but this is never needed in the renderer which only needs to know that the type is internally consistent. The owner type is renderer dependent so it can literally be anything.
36 lines
705 B
JavaScript
36 lines
705 B
JavaScript
/**
|
|
* Copyright 2016-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*
|
|
* @flow
|
|
* @providesModule ReactElementType
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
export type Source = {
|
|
fileName: string,
|
|
lineNumber: number,
|
|
};
|
|
|
|
export type ReactElement = {
|
|
$$typeof: any,
|
|
type: any,
|
|
key: any,
|
|
ref: any,
|
|
props: any,
|
|
_owner: any, // ReactInstance or ReactFiber
|
|
|
|
// __DEV__
|
|
_store: {
|
|
validated: boolean,
|
|
},
|
|
_self: ReactElement,
|
|
_shadowChildren: any,
|
|
_source: Source,
|
|
};
|