code
stringlengths
24
2.07M
docstring
stringlengths
25
85.3k
func_name
stringlengths
1
92
language
stringclasses
1 value
repo
stringlengths
5
64
path
stringlengths
4
172
url
stringlengths
44
218
license
stringclasses
7 values
function isValidElement(object) { { return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } }
Verifies the object is a ReactElement. See https://reactjs.org/docs/react-api.html#isvalidelement @param {?object} object @return {boolean} True if `object` is a ReactElement. @final
isValidElement
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-dev-runtime.development.js
MIT
function getDeclarationErrorAddendum() { { if (ReactCurrentOwner$1.current) { var name = ReactCurrentOwner$1.current.getName(); if (name) { return '\n\nCheck the render method of `' + name + '`.'; } } return ''; } }
Verifies the object is a ReactElement. See https://reactjs.org/docs/react-api.html#isvalidelement @param {?object} object @return {boolean} True if `object` is a ReactElement. @final
getDeclarationErrorAddendum
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-dev-runtime.development.js
MIT
function getSourceInfoErrorAddendum(source) { { if (source !== undefined) { var fileName = source.fileName.replace(/^.*[\\\/]/, ''); var lineNumber = source.lineNumber; return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; } return ''; } }
Verifies the object is a ReactElement. See https://reactjs.org/docs/react-api.html#isvalidelement @param {?object} object @return {boolean} True if `object` is a ReactElement. @final
getSourceInfoErrorAddendum
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-dev-runtime.development.js
MIT
function getCurrentComponentErrorInfo(parentType) { { var info = getDeclarationErrorAddendum(); if (!info) { var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; if (parentName) { info = "\n\nCheck the top-level render call using <" + ...
Warn if there's no key explicitly set on dynamic arrays of children or object keys are not valid. This allows us to keep track of children between updates.
getCurrentComponentErrorInfo
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-dev-runtime.development.js
MIT
function validateExplicitKey(element, parentType) { { if (!element._store || element._store.validated || element.key != null) { return; } element._store.validated = true; var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); if (ownerHasKeyUseWarning[currentComponentErr...
Warn if the element doesn't have an explicit key assigned to it. This element is in an array. The array could grow and shrink or be reordered. All children that haven't already been validated are required to have a "key" property assigned to it. Error statuses are cached so a warning will only be shown once. @internal...
validateExplicitKey
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-dev-runtime.development.js
MIT
function validateChildKeys(node, parentType) { { if (typeof node !== 'object') { return; } if (Array.isArray(node)) { for (var i = 0; i < node.length; i++) { var child = node[i]; if (isValidElement(child)) { validateExplicitKey(child, parentType); } } ...
Ensure that every element either is passed in a static location, in an array with an explicit keys property defined, or in an object literal with valid key property. @internal @param {ReactNode} node Statically passed child of any type. @param {*} parentType node's parent's type.
validateChildKeys
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-dev-runtime.development.js
MIT
function validatePropTypes(element) { { var type = element.type; if (type === null || type === undefined || typeof type === 'string') { return; } var propTypes; if (typeof type === 'function') { propTypes = type.propTypes; } else if (typeof type === 'object' && (type.$$typeof ==...
Given an element, validate that its props follow the propTypes definition, provided by the type. @param {ReactElement} element
validatePropTypes
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-dev-runtime.development.js
MIT
function validateFragmentProps(fragment) { { var keys = Object.keys(fragment.props); for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (key !== 'children' && key !== 'key') { setCurrentlyValidatingElement$1(fragment); error('Invalid prop `%s` supplied to `React.Fragm...
Given a fragment, validate that it can only be provided with fragment props @param {ReactElement} fragment
validateFragmentProps
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-dev-runtime.development.js
MIT
function jsxWithValidation(type, props, key, isStaticChildren, source, self) { { var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to // succeed and there will likely be errors in render. if (!validType) { var info = ''; if (typ...
Given a fragment, validate that it can only be provided with fragment props @param {ReactElement} fragment
jsxWithValidation
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-dev-runtime.development.js
MIT
ReactElement = function (type, key, ref, self, source, owner, props) { var element = { // This tag allows us to uniquely identify this as a React Element $$typeof: REACT_ELEMENT_TYPE, // Built-in properties that belong on the element type: type, key: key, ref: ref, props: props, // Rec...
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, instanceof check will not work. Instead test $$typeof field against Symbol.for('react.element') to check if something is a React Element. @param {*} type @param {*} props @param {*} key @param...
ReactElement
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
MIT
function jsxDEV(type, config, maybeKey, source, self) { { var propName; // Reserved names are extracted var props = {}; var key = null; var ref = null; // Currently, key can be spread in as a prop. This causes a potential // issue if key is also explicitly declared (ie. <div {...props} key="Hi" /...
https://github.com/reactjs/rfcs/pull/107 @param {*} type @param {object} props @param {string} key
jsxDEV
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
MIT
function setCurrentlyValidatingElement$1(element) { currentlyValidatingElement = element; }
https://github.com/reactjs/rfcs/pull/107 @param {*} type @param {object} props @param {string} key
setCurrentlyValidatingElement$1
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
MIT
function isValidElement(object) { { return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } }
Verifies the object is a ReactElement. See https://reactjs.org/docs/react-api.html#isvalidelement @param {?object} object @return {boolean} True if `object` is a ReactElement. @final
isValidElement
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
MIT
function getDeclarationErrorAddendum() { { if (ReactCurrentOwner$1.current) { var name = ReactCurrentOwner$1.current.getName(); if (name) { return '\n\nCheck the render method of `' + name + '`.'; } } return ''; } }
Verifies the object is a ReactElement. See https://reactjs.org/docs/react-api.html#isvalidelement @param {?object} object @return {boolean} True if `object` is a ReactElement. @final
getDeclarationErrorAddendum
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
MIT
function getSourceInfoErrorAddendum(source) { { if (source !== undefined) { var fileName = source.fileName.replace(/^.*[\\\/]/, ''); var lineNumber = source.lineNumber; return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; } return ''; } }
Verifies the object is a ReactElement. See https://reactjs.org/docs/react-api.html#isvalidelement @param {?object} object @return {boolean} True if `object` is a ReactElement. @final
getSourceInfoErrorAddendum
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
MIT
function getCurrentComponentErrorInfo(parentType) { { var info = getDeclarationErrorAddendum(); if (!info) { var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; if (parentName) { info = "\n\nCheck the top-level render call using <" + ...
Warn if there's no key explicitly set on dynamic arrays of children or object keys are not valid. This allows us to keep track of children between updates.
getCurrentComponentErrorInfo
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
MIT
function validateExplicitKey(element, parentType) { { if (!element._store || element._store.validated || element.key != null) { return; } element._store.validated = true; var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); if (ownerHasKeyUseWarning[currentComponentErr...
Warn if the element doesn't have an explicit key assigned to it. This element is in an array. The array could grow and shrink or be reordered. All children that haven't already been validated are required to have a "key" property assigned to it. Error statuses are cached so a warning will only be shown once. @internal...
validateExplicitKey
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
MIT
function validateChildKeys(node, parentType) { { if (typeof node !== 'object') { return; } if (Array.isArray(node)) { for (var i = 0; i < node.length; i++) { var child = node[i]; if (isValidElement(child)) { validateExplicitKey(child, parentType); } } ...
Ensure that every element either is passed in a static location, in an array with an explicit keys property defined, or in an object literal with valid key property. @internal @param {ReactNode} node Statically passed child of any type. @param {*} parentType node's parent's type.
validateChildKeys
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
MIT
function validatePropTypes(element) { { var type = element.type; if (type === null || type === undefined || typeof type === 'string') { return; } var propTypes; if (typeof type === 'function') { propTypes = type.propTypes; } else if (typeof type === 'object' && (type.$$typeof ==...
Given an element, validate that its props follow the propTypes definition, provided by the type. @param {ReactElement} element
validatePropTypes
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
MIT
function validateFragmentProps(fragment) { { var keys = Object.keys(fragment.props); for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (key !== 'children' && key !== 'key') { setCurrentlyValidatingElement$1(fragment); error('Invalid prop `%s` supplied to `React.Fragm...
Given a fragment, validate that it can only be provided with fragment props @param {ReactElement} fragment
validateFragmentProps
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
MIT
function jsxWithValidation(type, props, key, isStaticChildren, source, self) { { var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to // succeed and there will likely be errors in render. if (!validType) { var info = ''; if (typ...
Given a fragment, validate that it can only be provided with fragment props @param {ReactElement} fragment
jsxWithValidation
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
MIT
function jsxWithValidationStatic(type, props, key) { { return jsxWithValidation(type, props, key, true); } }
Given a fragment, validate that it can only be provided with fragment props @param {ReactElement} fragment
jsxWithValidationStatic
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
MIT
function jsxWithValidationDynamic(type, props, key) { { return jsxWithValidation(type, props, key, false); } }
Given a fragment, validate that it can only be provided with fragment props @param {ReactElement} fragment
jsxWithValidationDynamic
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-15/cjs/react-jsx-runtime.development.js
MIT
ReactElement = function (type, key, ref, self, source, owner, props) { var element = { // This tag allows us to uniquely identify this as a React Element $$typeof: REACT_ELEMENT_TYPE, // Built-in properties that belong on the element type: type, key: key, ref: ref, props: props, // Rec...
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, instanceof check will not work. Instead test $$typeof field against Symbol.for('react.element') to check if something is a React Element. @param {*} type @param {*} props @param {*} key @param...
ReactElement
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
MIT
function jsxDEV(type, config, maybeKey, source, self) { { var propName; // Reserved names are extracted var props = {}; var key = null; var ref = null; // Currently, key can be spread in as a prop. This causes a potential // issue if key is also explicitly declared (ie. <div {...props} key="Hi" /...
https://github.com/reactjs/rfcs/pull/107 @param {*} type @param {object} props @param {string} key
jsxDEV
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
MIT
function setCurrentlyValidatingElement$1(element) { currentlyValidatingElement = element; }
https://github.com/reactjs/rfcs/pull/107 @param {*} type @param {object} props @param {string} key
setCurrentlyValidatingElement$1
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
MIT
function isValidElement(object) { { return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } }
Verifies the object is a ReactElement. See https://reactjs.org/docs/react-api.html#isvalidelement @param {?object} object @return {boolean} True if `object` is a ReactElement. @final
isValidElement
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
MIT
function getDeclarationErrorAddendum() { { if (ReactCurrentOwner$1.current) { var name = getComponentName(ReactCurrentOwner$1.current.type); if (name) { return '\n\nCheck the render method of `' + name + '`.'; } } return ''; } }
Verifies the object is a ReactElement. See https://reactjs.org/docs/react-api.html#isvalidelement @param {?object} object @return {boolean} True if `object` is a ReactElement. @final
getDeclarationErrorAddendum
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
MIT
function getSourceInfoErrorAddendum(source) { { if (source !== undefined) { var fileName = source.fileName.replace(/^.*[\\\/]/, ''); var lineNumber = source.lineNumber; return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; } return ''; } }
Verifies the object is a ReactElement. See https://reactjs.org/docs/react-api.html#isvalidelement @param {?object} object @return {boolean} True if `object` is a ReactElement. @final
getSourceInfoErrorAddendum
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
MIT
function getCurrentComponentErrorInfo(parentType) { { var info = getDeclarationErrorAddendum(); if (!info) { var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; if (parentName) { info = "\n\nCheck the top-level render call using <" + ...
Warn if there's no key explicitly set on dynamic arrays of children or object keys are not valid. This allows us to keep track of children between updates.
getCurrentComponentErrorInfo
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
MIT
function validateExplicitKey(element, parentType) { { if (!element._store || element._store.validated || element.key != null) { return; } element._store.validated = true; var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); if (ownerHasKeyUseWarning[currentComponentErr...
Warn if the element doesn't have an explicit key assigned to it. This element is in an array. The array could grow and shrink or be reordered. All children that haven't already been validated are required to have a "key" property assigned to it. Error statuses are cached so a warning will only be shown once. @internal...
validateExplicitKey
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
MIT
function validateChildKeys(node, parentType) { { if (typeof node !== 'object') { return; } if (Array.isArray(node)) { for (var i = 0; i < node.length; i++) { var child = node[i]; if (isValidElement(child)) { validateExplicitKey(child, parentType); } } ...
Ensure that every element either is passed in a static location, in an array with an explicit keys property defined, or in an object literal with valid key property. @internal @param {ReactNode} node Statically passed child of any type. @param {*} parentType node's parent's type.
validateChildKeys
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
MIT
function validatePropTypes(element) { { var type = element.type; if (type === null || type === undefined || typeof type === 'string') { return; } var propTypes; if (typeof type === 'function') { propTypes = type.propTypes; } else if (typeof type === 'object' && (type.$$typeof ==...
Given an element, validate that its props follow the propTypes definition, provided by the type. @param {ReactElement} element
validatePropTypes
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
MIT
function validateFragmentProps(fragment) { { var keys = Object.keys(fragment.props); for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (key !== 'children' && key !== 'key') { setCurrentlyValidatingElement$1(fragment); error('Invalid prop `%s` supplied to `React.Fragm...
Given a fragment, validate that it can only be provided with fragment props @param {ReactElement} fragment
validateFragmentProps
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
MIT
function jsxWithValidation(type, props, key, isStaticChildren, source, self) { { var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to // succeed and there will likely be errors in render. if (!validType) { var info = ''; if (typ...
Given a fragment, validate that it can only be provided with fragment props @param {ReactElement} fragment
jsxWithValidation
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-dev-runtime.development.js
MIT
ReactElement = function (type, key, ref, self, source, owner, props) { var element = { // This tag allows us to uniquely identify this as a React Element $$typeof: REACT_ELEMENT_TYPE, // Built-in properties that belong on the element type: type, key: key, ref: ref, props: props, // Rec...
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, instanceof check will not work. Instead test $$typeof field against Symbol.for('react.element') to check if something is a React Element. @param {*} type @param {*} props @param {*} key @param...
ReactElement
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
MIT
function jsxDEV(type, config, maybeKey, source, self) { { var propName; // Reserved names are extracted var props = {}; var key = null; var ref = null; // Currently, key can be spread in as a prop. This causes a potential // issue if key is also explicitly declared (ie. <div {...props} key="Hi" /...
https://github.com/reactjs/rfcs/pull/107 @param {*} type @param {object} props @param {string} key
jsxDEV
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
MIT
function setCurrentlyValidatingElement$1(element) { currentlyValidatingElement = element; }
https://github.com/reactjs/rfcs/pull/107 @param {*} type @param {object} props @param {string} key
setCurrentlyValidatingElement$1
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
MIT
function isValidElement(object) { { return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } }
Verifies the object is a ReactElement. See https://reactjs.org/docs/react-api.html#isvalidelement @param {?object} object @return {boolean} True if `object` is a ReactElement. @final
isValidElement
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
MIT
function getDeclarationErrorAddendum() { { if (ReactCurrentOwner$1.current) { var name = getComponentName(ReactCurrentOwner$1.current.type); if (name) { return '\n\nCheck the render method of `' + name + '`.'; } } return ''; } }
Verifies the object is a ReactElement. See https://reactjs.org/docs/react-api.html#isvalidelement @param {?object} object @return {boolean} True if `object` is a ReactElement. @final
getDeclarationErrorAddendum
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
MIT
function getSourceInfoErrorAddendum(source) { { if (source !== undefined) { var fileName = source.fileName.replace(/^.*[\\\/]/, ''); var lineNumber = source.lineNumber; return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; } return ''; } }
Verifies the object is a ReactElement. See https://reactjs.org/docs/react-api.html#isvalidelement @param {?object} object @return {boolean} True if `object` is a ReactElement. @final
getSourceInfoErrorAddendum
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
MIT
function getCurrentComponentErrorInfo(parentType) { { var info = getDeclarationErrorAddendum(); if (!info) { var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; if (parentName) { info = "\n\nCheck the top-level render call using <" + ...
Warn if there's no key explicitly set on dynamic arrays of children or object keys are not valid. This allows us to keep track of children between updates.
getCurrentComponentErrorInfo
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
MIT
function validateExplicitKey(element, parentType) { { if (!element._store || element._store.validated || element.key != null) { return; } element._store.validated = true; var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); if (ownerHasKeyUseWarning[currentComponentErr...
Warn if the element doesn't have an explicit key assigned to it. This element is in an array. The array could grow and shrink or be reordered. All children that haven't already been validated are required to have a "key" property assigned to it. Error statuses are cached so a warning will only be shown once. @internal...
validateExplicitKey
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
MIT
function validateChildKeys(node, parentType) { { if (typeof node !== 'object') { return; } if (Array.isArray(node)) { for (var i = 0; i < node.length; i++) { var child = node[i]; if (isValidElement(child)) { validateExplicitKey(child, parentType); } } ...
Ensure that every element either is passed in a static location, in an array with an explicit keys property defined, or in an object literal with valid key property. @internal @param {ReactNode} node Statically passed child of any type. @param {*} parentType node's parent's type.
validateChildKeys
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
MIT
function validatePropTypes(element) { { var type = element.type; if (type === null || type === undefined || typeof type === 'string') { return; } var propTypes; if (typeof type === 'function') { propTypes = type.propTypes; } else if (typeof type === 'object' && (type.$$typeof ==...
Given an element, validate that its props follow the propTypes definition, provided by the type. @param {ReactElement} element
validatePropTypes
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
MIT
function validateFragmentProps(fragment) { { var keys = Object.keys(fragment.props); for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (key !== 'children' && key !== 'key') { setCurrentlyValidatingElement$1(fragment); error('Invalid prop `%s` supplied to `React.Fragm...
Given a fragment, validate that it can only be provided with fragment props @param {ReactElement} fragment
validateFragmentProps
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
MIT
function jsxWithValidation(type, props, key, isStaticChildren, source, self) { { var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to // succeed and there will likely be errors in render. if (!validType) { var info = ''; if (typ...
Given a fragment, validate that it can only be provided with fragment props @param {ReactElement} fragment
jsxWithValidation
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
MIT
function jsxWithValidationStatic(type, props, key) { { return jsxWithValidation(type, props, key, true); } }
Given a fragment, validate that it can only be provided with fragment props @param {ReactElement} fragment
jsxWithValidationStatic
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
MIT
function jsxWithValidationDynamic(type, props, key) { { return jsxWithValidation(type, props, key, false); } }
Given a fragment, validate that it can only be provided with fragment props @param {ReactElement} fragment
jsxWithValidationDynamic
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-16/cjs/react-jsx-runtime.development.js
MIT
ReactElement = function (type, key, ref, self, source, owner, props) { var element = { // This tag allows us to uniquely identify this as a React Element $$typeof: REACT_ELEMENT_TYPE, // Built-in properties that belong on the element type: type, key: key, ref: ref, props: props, // Rec...
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, instanceof check will not work. Instead test $$typeof field against Symbol.for('react.element') to check if something is a React Element. @param {*} type @param {*} props @param {*} key @param...
ReactElement
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
MIT
function jsxDEV(type, config, maybeKey, source, self) { { var propName; // Reserved names are extracted var props = {}; var key = null; var ref = null; // Currently, key can be spread in as a prop. This causes a potential // issue if key is also explicitly declared (ie. <div {...props} key="Hi" /...
https://github.com/reactjs/rfcs/pull/107 @param {*} type @param {object} props @param {string} key
jsxDEV
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
MIT
function setCurrentlyValidatingElement$1(element) { { if (element) { var owner = element._owner; var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); ReactDebugCurrentFrame$1.setExtraStackFrame(stack); } else { ReactDebugCurrentFra...
https://github.com/reactjs/rfcs/pull/107 @param {*} type @param {object} props @param {string} key
setCurrentlyValidatingElement$1
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
MIT
function isValidElement(object) { { return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } }
Verifies the object is a ReactElement. See https://reactjs.org/docs/react-api.html#isvalidelement @param {?object} object @return {boolean} True if `object` is a ReactElement. @final
isValidElement
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
MIT
function getDeclarationErrorAddendum() { { if (ReactCurrentOwner$1.current) { var name = getComponentName(ReactCurrentOwner$1.current.type); if (name) { return '\n\nCheck the render method of `' + name + '`.'; } } return ''; } }
Verifies the object is a ReactElement. See https://reactjs.org/docs/react-api.html#isvalidelement @param {?object} object @return {boolean} True if `object` is a ReactElement. @final
getDeclarationErrorAddendum
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
MIT
function getSourceInfoErrorAddendum(source) { { if (source !== undefined) { var fileName = source.fileName.replace(/^.*[\\\/]/, ''); var lineNumber = source.lineNumber; return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; } return ''; } }
Verifies the object is a ReactElement. See https://reactjs.org/docs/react-api.html#isvalidelement @param {?object} object @return {boolean} True if `object` is a ReactElement. @final
getSourceInfoErrorAddendum
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
MIT
function getCurrentComponentErrorInfo(parentType) { { var info = getDeclarationErrorAddendum(); if (!info) { var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; if (parentName) { info = "\n\nCheck the top-level render call using <" + ...
Warn if there's no key explicitly set on dynamic arrays of children or object keys are not valid. This allows us to keep track of children between updates.
getCurrentComponentErrorInfo
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
MIT
function validateExplicitKey(element, parentType) { { if (!element._store || element._store.validated || element.key != null) { return; } element._store.validated = true; var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); if (ownerHasKeyUseWarning[currentComponentErr...
Warn if the element doesn't have an explicit key assigned to it. This element is in an array. The array could grow and shrink or be reordered. All children that haven't already been validated are required to have a "key" property assigned to it. Error statuses are cached so a warning will only be shown once. @internal...
validateExplicitKey
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
MIT
function validateChildKeys(node, parentType) { { if (typeof node !== 'object') { return; } if (Array.isArray(node)) { for (var i = 0; i < node.length; i++) { var child = node[i]; if (isValidElement(child)) { validateExplicitKey(child, parentType); } } ...
Ensure that every element either is passed in a static location, in an array with an explicit keys property defined, or in an object literal with valid key property. @internal @param {ReactNode} node Statically passed child of any type. @param {*} parentType node's parent's type.
validateChildKeys
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
MIT
function validatePropTypes(element) { { var type = element.type; if (type === null || type === undefined || typeof type === 'string') { return; } var propTypes; if (typeof type === 'function') { propTypes = type.propTypes; } else if (typeof type === 'object' && (type.$$typeof ==...
Given an element, validate that its props follow the propTypes definition, provided by the type. @param {ReactElement} element
validatePropTypes
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
MIT
function validateFragmentProps(fragment) { { var keys = Object.keys(fragment.props); for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (key !== 'children' && key !== 'key') { setCurrentlyValidatingElement$1(fragment); error('Invalid prop `%s` supplied to `React.Fragm...
Given a fragment, validate that it can only be provided with fragment props @param {ReactElement} fragment
validateFragmentProps
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
MIT
function jsxWithValidation(type, props, key, isStaticChildren, source, self) { { var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to // succeed and there will likely be errors in render. if (!validType) { var info = ''; if (typ...
Given a fragment, validate that it can only be provided with fragment props @param {ReactElement} fragment
jsxWithValidation
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-dev-runtime.development.js
MIT
ReactElement = function (type, key, ref, self, source, owner, props) { var element = { // This tag allows us to uniquely identify this as a React Element $$typeof: REACT_ELEMENT_TYPE, // Built-in properties that belong on the element type: type, key: key, ref: ref, props: props, // Rec...
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, instanceof check will not work. Instead test $$typeof field against Symbol.for('react.element') to check if something is a React Element. @param {*} type @param {*} props @param {*} key @param...
ReactElement
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
MIT
function jsxDEV(type, config, maybeKey, source, self) { { var propName; // Reserved names are extracted var props = {}; var key = null; var ref = null; // Currently, key can be spread in as a prop. This causes a potential // issue if key is also explicitly declared (ie. <div {...props} key="Hi" /...
https://github.com/reactjs/rfcs/pull/107 @param {*} type @param {object} props @param {string} key
jsxDEV
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
MIT
function setCurrentlyValidatingElement$1(element) { { if (element) { var owner = element._owner; var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); ReactDebugCurrentFrame$1.setExtraStackFrame(stack); } else { ReactDebugCurrentFra...
https://github.com/reactjs/rfcs/pull/107 @param {*} type @param {object} props @param {string} key
setCurrentlyValidatingElement$1
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
MIT
function isValidElement(object) { { return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } }
Verifies the object is a ReactElement. See https://reactjs.org/docs/react-api.html#isvalidelement @param {?object} object @return {boolean} True if `object` is a ReactElement. @final
isValidElement
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
MIT
function getDeclarationErrorAddendum() { { if (ReactCurrentOwner$1.current) { var name = getComponentName(ReactCurrentOwner$1.current.type); if (name) { return '\n\nCheck the render method of `' + name + '`.'; } } return ''; } }
Verifies the object is a ReactElement. See https://reactjs.org/docs/react-api.html#isvalidelement @param {?object} object @return {boolean} True if `object` is a ReactElement. @final
getDeclarationErrorAddendum
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
MIT
function getSourceInfoErrorAddendum(source) { { if (source !== undefined) { var fileName = source.fileName.replace(/^.*[\\\/]/, ''); var lineNumber = source.lineNumber; return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; } return ''; } }
Verifies the object is a ReactElement. See https://reactjs.org/docs/react-api.html#isvalidelement @param {?object} object @return {boolean} True if `object` is a ReactElement. @final
getSourceInfoErrorAddendum
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
MIT
function getCurrentComponentErrorInfo(parentType) { { var info = getDeclarationErrorAddendum(); if (!info) { var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; if (parentName) { info = "\n\nCheck the top-level render call using <" + ...
Warn if there's no key explicitly set on dynamic arrays of children or object keys are not valid. This allows us to keep track of children between updates.
getCurrentComponentErrorInfo
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
MIT
function validateExplicitKey(element, parentType) { { if (!element._store || element._store.validated || element.key != null) { return; } element._store.validated = true; var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); if (ownerHasKeyUseWarning[currentComponentErr...
Warn if the element doesn't have an explicit key assigned to it. This element is in an array. The array could grow and shrink or be reordered. All children that haven't already been validated are required to have a "key" property assigned to it. Error statuses are cached so a warning will only be shown once. @internal...
validateExplicitKey
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
MIT
function validateChildKeys(node, parentType) { { if (typeof node !== 'object') { return; } if (Array.isArray(node)) { for (var i = 0; i < node.length; i++) { var child = node[i]; if (isValidElement(child)) { validateExplicitKey(child, parentType); } } ...
Ensure that every element either is passed in a static location, in an array with an explicit keys property defined, or in an object literal with valid key property. @internal @param {ReactNode} node Statically passed child of any type. @param {*} parentType node's parent's type.
validateChildKeys
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
MIT
function validatePropTypes(element) { { var type = element.type; if (type === null || type === undefined || typeof type === 'string') { return; } var propTypes; if (typeof type === 'function') { propTypes = type.propTypes; } else if (typeof type === 'object' && (type.$$typeof ==...
Given an element, validate that its props follow the propTypes definition, provided by the type. @param {ReactElement} element
validatePropTypes
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
MIT
function validateFragmentProps(fragment) { { var keys = Object.keys(fragment.props); for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (key !== 'children' && key !== 'key') { setCurrentlyValidatingElement$1(fragment); error('Invalid prop `%s` supplied to `React.Fragm...
Given a fragment, validate that it can only be provided with fragment props @param {ReactElement} fragment
validateFragmentProps
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
MIT
function jsxWithValidation(type, props, key, isStaticChildren, source, self) { { var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to // succeed and there will likely be errors in render. if (!validType) { var info = ''; if (typ...
Given a fragment, validate that it can only be provided with fragment props @param {ReactElement} fragment
jsxWithValidation
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
MIT
function jsxWithValidationStatic(type, props, key) { { return jsxWithValidation(type, props, key, true); } }
Given a fragment, validate that it can only be provided with fragment props @param {ReactElement} fragment
jsxWithValidationStatic
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
MIT
function jsxWithValidationDynamic(type, props, key) { { return jsxWithValidation(type, props, key, false); } }
Given a fragment, validate that it can only be provided with fragment props @param {ReactElement} fragment
jsxWithValidationDynamic
javascript
facebook/react
fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
https://github.com/facebook/react/blob/master/fixtures/legacy-jsx-runtimes/react-17/cjs/react-jsx-runtime.development.js
MIT
function createEvent(type, data = {}) { const event = document.createEvent('CustomEvent'); event.initCustomEvent(type, true, true); if (data != null) { Object.keys(data).forEach(key => { const value = data[key]; if (key === 'timeStamp' && !value) { return; } Object.defineProper...
Native event object mocks for higher-level events. 1. Each event type defines the exact object that it accepts. This ensures that no arbitrary properties can be assigned to events, and the properties that don't exist on specific event types (e.g., 'pointerType') are not added to the respective native event. 2. Proper...
createEvent
javascript
facebook/react
packages/dom-event-testing-library/domEvents.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/domEvents.js
MIT
function createGetModifierState(keyArg, data) { if (keyArg === 'Alt') { return data.altKey || false; } if (keyArg === 'Control') { return data.ctrlKey || false; } if (keyArg === 'Meta') { return data.metaKey || false; } if (keyArg === 'Shift') { return data.shiftKey || false; } }
Native event object mocks for higher-level events. 1. Each event type defines the exact object that it accepts. This ensures that no arbitrary properties can be assigned to events, and the properties that don't exist on specific event types (e.g., 'pointerType') are not added to the respective native event. 2. Proper...
createGetModifierState
javascript
facebook/react
packages/dom-event-testing-library/domEvents.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/domEvents.js
MIT
function createPointerEvent( type, { altKey = false, button = buttonType.none, buttons = buttonsType.none, ctrlKey = false, detail = 1, height, metaKey = false, movementX = 0, movementY = 0, offsetX = 0, offsetY = 0, pageX, pageY, pointerId, pressure = 0, ...
Native event object mocks for higher-level events. 1. Each event type defines the exact object that it accepts. This ensures that no arbitrary properties can be assigned to events, and the properties that don't exist on specific event types (e.g., 'pointerType') are not added to the respective native event. 2. Proper...
createPointerEvent
javascript
facebook/react
packages/dom-event-testing-library/domEvents.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/domEvents.js
MIT
getModifierState(keyArg) { return createGetModifierState(keyArg, modifierState); }
Native event object mocks for higher-level events. 1. Each event type defines the exact object that it accepts. This ensures that no arbitrary properties can be assigned to events, and the properties that don't exist on specific event types (e.g., 'pointerType') are not added to the respective native event. 2. Proper...
getModifierState
javascript
facebook/react
packages/dom-event-testing-library/domEvents.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/domEvents.js
MIT
function createKeyboardEvent( type, { altKey = false, ctrlKey = false, isComposing = false, key = '', metaKey = false, preventDefault = emptyFunction, shiftKey = false, } = {}, ) { const modifierState = {altKey, ctrlKey, metaKey, shiftKey}; return createEvent(type, { altKey, ...
Native event object mocks for higher-level events. 1. Each event type defines the exact object that it accepts. This ensures that no arbitrary properties can be assigned to events, and the properties that don't exist on specific event types (e.g., 'pointerType') are not added to the respective native event. 2. Proper...
createKeyboardEvent
javascript
facebook/react
packages/dom-event-testing-library/domEvents.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/domEvents.js
MIT
getModifierState(keyArg) { return createGetModifierState(keyArg, modifierState); }
Native event object mocks for higher-level events. 1. Each event type defines the exact object that it accepts. This ensures that no arbitrary properties can be assigned to events, and the properties that don't exist on specific event types (e.g., 'pointerType') are not added to the respective native event. 2. Proper...
getModifierState
javascript
facebook/react
packages/dom-event-testing-library/domEvents.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/domEvents.js
MIT
function createMouseEvent( type, { altKey = false, button = buttonType.none, buttons = buttonsType.none, ctrlKey = false, detail = 1, metaKey = false, movementX = 0, movementY = 0, offsetX = 0, offsetY = 0, pageX, pageY, preventDefault = emptyFunction, screenX...
Native event object mocks for higher-level events. 1. Each event type defines the exact object that it accepts. This ensures that no arbitrary properties can be assigned to events, and the properties that don't exist on specific event types (e.g., 'pointerType') are not added to the respective native event. 2. Proper...
createMouseEvent
javascript
facebook/react
packages/dom-event-testing-library/domEvents.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/domEvents.js
MIT
getModifierState(keyArg) { return createGetModifierState(keyArg, modifierState); }
Native event object mocks for higher-level events. 1. Each event type defines the exact object that it accepts. This ensures that no arbitrary properties can be assigned to events, and the properties that don't exist on specific event types (e.g., 'pointerType') are not added to the respective native event. 2. Proper...
getModifierState
javascript
facebook/react
packages/dom-event-testing-library/domEvents.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/domEvents.js
MIT
function createTouchEvent(type, payload) { return createEvent(type, { ...payload, detail: 0, sourceCapabilities: { firesTouchEvents: true, }, }); }
Native event object mocks for higher-level events. 1. Each event type defines the exact object that it accepts. This ensures that no arbitrary properties can be assigned to events, and the properties that don't exist on specific event types (e.g., 'pointerType') are not added to the respective native event. 2. Proper...
createTouchEvent
javascript
facebook/react
packages/dom-event-testing-library/domEvents.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/domEvents.js
MIT
function contextmenu( target, defaultPayload, {pointerType = 'mouse', modified} = {}, ) { const dispatch = arg => target.dispatchEvent(arg); const payload = { pointerId: defaultPointerId, pointerType, ...defaultPayload, }; const preventDefault = payload.preventDefault; if (pointerType ===...
Pointer events sequences. Creates representative browser event sequences for high-level gestures based on pointers. This allows unit tests to be written in terms of simple pointer interactions while testing that the responses to those interactions account for the complex sequence of events that browsers produce as a r...
contextmenu
javascript
facebook/react
packages/dom-event-testing-library/domEventSequences.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/domEventSequences.js
MIT
function pointercancel(target, defaultPayload) { const dispatchEvent = arg => target.dispatchEvent(arg); const pointerType = getPointerType(defaultPayload); const payload = { pointerId: defaultPointerId, pointerType, ...defaultPayload, }; if (hasPointerEvent()) { dispatchEvent(domEvents.poin...
Pointer events sequences. Creates representative browser event sequences for high-level gestures based on pointers. This allows unit tests to be written in terms of simple pointer interactions while testing that the responses to those interactions account for the complex sequence of events that browsers produce as a r...
pointercancel
javascript
facebook/react
packages/dom-event-testing-library/domEventSequences.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/domEventSequences.js
MIT
function pointerdown(target, defaultPayload) { const dispatch = arg => target.dispatchEvent(arg); const pointerType = getPointerType(defaultPayload); const payload = { button: buttonType.primary, buttons: buttonsType.primary, pointerId: defaultPointerId, pointerType, ...defaultPayload, }; ...
Pointer events sequences. Creates representative browser event sequences for high-level gestures based on pointers. This allows unit tests to be written in terms of simple pointer interactions while testing that the responses to those interactions account for the complex sequence of events that browsers produce as a r...
pointerdown
javascript
facebook/react
packages/dom-event-testing-library/domEventSequences.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/domEventSequences.js
MIT
function pointerenter(target, defaultPayload) { const dispatch = arg => target.dispatchEvent(arg); const payload = { pointerId: defaultPointerId, ...defaultPayload, }; if (hasPointerEvent()) { dispatch(domEvents.pointerover(payload)); dispatch(domEvents.pointerenter(payload)); } dispatch(d...
Pointer events sequences. Creates representative browser event sequences for high-level gestures based on pointers. This allows unit tests to be written in terms of simple pointer interactions while testing that the responses to those interactions account for the complex sequence of events that browsers produce as a r...
pointerenter
javascript
facebook/react
packages/dom-event-testing-library/domEventSequences.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/domEventSequences.js
MIT
function pointerexit(target, defaultPayload) { const dispatch = arg => target.dispatchEvent(arg); const payload = { pointerId: defaultPointerId, ...defaultPayload, }; if (hasPointerEvent()) { dispatch(domEvents.pointerout(payload)); dispatch(domEvents.pointerleave(payload)); } dispatch(dom...
Pointer events sequences. Creates representative browser event sequences for high-level gestures based on pointers. This allows unit tests to be written in terms of simple pointer interactions while testing that the responses to those interactions account for the complex sequence of events that browsers produce as a r...
pointerexit
javascript
facebook/react
packages/dom-event-testing-library/domEventSequences.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/domEventSequences.js
MIT
function pointerhover(target, defaultPayload) { const dispatch = arg => target.dispatchEvent(arg); const payload = { pointerId: defaultPointerId, ...defaultPayload, }; if (hasPointerEvent()) { dispatch(domEvents.pointermove(payload)); } dispatch(domEvents.mousemove(payload)); }
Pointer events sequences. Creates representative browser event sequences for high-level gestures based on pointers. This allows unit tests to be written in terms of simple pointer interactions while testing that the responses to those interactions account for the complex sequence of events that browsers produce as a r...
pointerhover
javascript
facebook/react
packages/dom-event-testing-library/domEventSequences.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/domEventSequences.js
MIT
function pointermove(target, defaultPayload) { const dispatch = arg => target.dispatchEvent(arg); const pointerType = getPointerType(defaultPayload); const payload = { pointerId: defaultPointerId, pointerType, ...defaultPayload, }; if (hasPointerEvent()) { dispatch( domEvents.pointermo...
Pointer events sequences. Creates representative browser event sequences for high-level gestures based on pointers. This allows unit tests to be written in terms of simple pointer interactions while testing that the responses to those interactions account for the complex sequence of events that browsers produce as a r...
pointermove
javascript
facebook/react
packages/dom-event-testing-library/domEventSequences.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/domEventSequences.js
MIT
function pointerup(target, defaultPayload) { const dispatch = arg => target.dispatchEvent(arg); const pointerType = getPointerType(defaultPayload); const payload = { pointerId: defaultPointerId, pointerType, ...defaultPayload, }; if (pointerType === 'mouse') { if (hasPointerEvent()) { ...
Pointer events sequences. Creates representative browser event sequences for high-level gestures based on pointers. This allows unit tests to be written in terms of simple pointer interactions while testing that the responses to those interactions account for the complex sequence of events that browsers produce as a r...
pointerup
javascript
facebook/react
packages/dom-event-testing-library/domEventSequences.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/domEventSequences.js
MIT
contextmenu(payload, options) { domEventSequences.contextmenu(node, payload, options); }
PointerEvent abstraction. Dispatches the expected sequence of PointerEvents, MouseEvents, and TouchEvents for a given environment.
contextmenu
javascript
facebook/react
packages/dom-event-testing-library/index.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/index.js
MIT
pointercancel(payload) { domEventSequences.pointercancel(node, payload); }
PointerEvent abstraction. Dispatches the expected sequence of PointerEvents, MouseEvents, and TouchEvents for a given environment.
pointercancel
javascript
facebook/react
packages/dom-event-testing-library/index.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/index.js
MIT
pointerdown(payload) { domEventSequences.pointerdown(node, payload); }
PointerEvent abstraction. Dispatches the expected sequence of PointerEvents, MouseEvents, and TouchEvents for a given environment.
pointerdown
javascript
facebook/react
packages/dom-event-testing-library/index.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/index.js
MIT
pointerhover(payload) { domEventSequences.pointerhover(node, payload); }
PointerEvent abstraction. Dispatches the expected sequence of PointerEvents, MouseEvents, and TouchEvents for a given environment.
pointerhover
javascript
facebook/react
packages/dom-event-testing-library/index.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/index.js
MIT
pointermove(payload) { domEventSequences.pointermove(node, payload); }
PointerEvent abstraction. Dispatches the expected sequence of PointerEvents, MouseEvents, and TouchEvents for a given environment.
pointermove
javascript
facebook/react
packages/dom-event-testing-library/index.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/index.js
MIT
pointerenter(payload) { domEventSequences.pointerenter(node, payload); }
PointerEvent abstraction. Dispatches the expected sequence of PointerEvents, MouseEvents, and TouchEvents for a given environment.
pointerenter
javascript
facebook/react
packages/dom-event-testing-library/index.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/index.js
MIT
pointerexit(payload) { domEventSequences.pointerexit(node, payload); }
PointerEvent abstraction. Dispatches the expected sequence of PointerEvents, MouseEvents, and TouchEvents for a given environment.
pointerexit
javascript
facebook/react
packages/dom-event-testing-library/index.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/index.js
MIT
pointerup(payload) { domEventSequences.pointerup(node, payload); }
PointerEvent abstraction. Dispatches the expected sequence of PointerEvents, MouseEvents, and TouchEvents for a given environment.
pointerup
javascript
facebook/react
packages/dom-event-testing-library/index.js
https://github.com/facebook/react/blob/master/packages/dom-event-testing-library/index.js
MIT