Skip to content

Instantly share code, notes, and snippets.

@doque
Created July 11, 2017 08:49
Show Gist options
  • Save doque/4356d7f8538043d81b972692cb60e926 to your computer and use it in GitHub Desktop.
Save doque/4356d7f8538043d81b972692cb60e926 to your computer and use it in GitHub Desktop.
×
TypeError: allStylePropTypes[prop] is not a function
Function.validateStyleProp
node_modules/react-native-web/dist/apis/StyleSheet/StyleSheetValidation.js:1
> 1 | Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();var _ImageStylePropTypes=require('../../components/Image/ImageStylePropTypes');var _ImageStylePropTypes2=_interopRequireDefault(_ImageStylePropTypes);var _TextInputStylePropTypes=require('../../components/TextInput/TextInputStylePropTypes');var _TextInputStylePropTypes2=_interopRequireDefault(_TextInputStylePropTypes);var _TextStylePropTypes=require('../../components/Text/TextStylePropTypes');var _TextStylePropTypes2=_interopRequireDefault(_TextStylePropTypes);var _ViewStylePropTypes=require('../../components/View/ViewStylePropTypes');var _ViewStylePropTypes2=_interopRequireDefault(_ViewStylePropTypes);var _warning=require('fbjs/lib/warning');var _warning2=_interopRequireDefault(_warning);var _propTypes=require('prop-types');function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}var ReactPropTypesSecret='SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';var StyleSheetValidation=function(){function StyleSheetValidation(){_classCallCheck(this,StyleSheetValidation);}_createClass(StyleSheetValidation,null,[{key:'validateStyleProp',value:function validateStyleProp(prop,style,caller){if(process.env.NODE_ENV!=='production'){if(allStylePropTypes[prop]===undefined){var message1='"'+prop+'" is not a valid style property.';var message2='\nValid style props: '+JSON.stringify(Object.keys(allStylePropTypes).sort(),null,' ');styleError(message1,style,caller,message2);}var error=allStylePropTypes[prop](style,prop,caller,'prop',null,ReactPropTypesSecret);if(error){styleError(error.message,style,caller);}}}},{key:'validateStyle',value:function validateStyle(name,styles){if(process.env.NODE_ENV!=='production'){for(var prop in styles[name]){StyleSheetValidation.validateStyleProp(prop,styles[name],'StyleSheet '+name);}}}},{key:'addValidStylePropTypes',value:function addValidStylePropTypes(stylePropTypes){for(var key in stylePropTypes){allStylePropTypes[key]=stylePropTypes[key];}}}]);return StyleSheetValidation;}();exports.default=StyleSheetValidation;var styleError=function styleError(message1,style,caller,message2){(0,_warning2.default)(false,message1+'\n'+(caller||'<>')+': '+JSON.stringify(style,null,' ')+(message2||''));};var allStylePropTypes={};StyleSheetValidation.addValidStylePropTypes(_ImageStylePropTypes2.default);StyleSheetValidation.addValidStylePropTypes(_TextStylePropTypes2.default);StyleSheetValidation.addValidStylePropTypes(_TextInputStylePropTypes2.default);StyleSheetValidation.addValidStylePropTypes(_ViewStylePropTypes2.default);StyleSheetValidation.addValidStylePropTypes({appearance:_propTypes.string,clear:_propTypes.string,cursor:_propTypes.string,float:(0,_propTypes.oneOf)(['left','none','right']),font:_propTypes.string,listStyle:_propTypes.string,pointerEvents:_propTypes.string});
2 |
3 |
4 | //////////////////
View compiled
Function.validateStyle
node_modules/react-native-web/dist/apis/StyleSheet/StyleSheetValidation.js:1
> 1 | Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();var _ImageStylePropTypes=require('../../components/Image/ImageStylePropTypes');var _ImageStylePropTypes2=_interopRequireDefault(_ImageStylePropTypes);var _TextInputStylePropTypes=require('../../components/TextInput/TextInputStylePropTypes');var _TextInputStylePropTypes2=_interopRequireDefault(_TextInputStylePropTypes);var _TextStylePropTypes=require('../../components/Text/TextStylePropTypes');var _TextStylePropTypes2=_interopRequireDefault(_TextStylePropTypes);var _ViewStylePropTypes=require('../../components/View/ViewStylePropTypes');var _ViewStylePropTypes2=_interopRequireDefault(_ViewStylePropTypes);var _warning=require('fbjs/lib/warning');var _warning2=_interopRequireDefault(_warning);var _propTypes=require('prop-types');function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}var ReactPropTypesSecret='SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';var StyleSheetValidation=function(){function StyleSheetValidation(){_classCallCheck(this,StyleSheetValidation);}_createClass(StyleSheetValidation,null,[{key:'validateStyleProp',value:function validateStyleProp(prop,style,caller){if(process.env.NODE_ENV!=='production'){if(allStylePropTypes[prop]===undefined){var message1='"'+prop+'" is not a valid style property.';var message2='\nValid style props: '+JSON.stringify(Object.keys(allStylePropTypes).sort(),null,' ');styleError(message1,style,caller,message2);}var error=allStylePropTypes[prop](style,prop,caller,'prop',null,ReactPropTypesSecret);if(error){styleError(error.message,style,caller);}}}},{key:'validateStyle',value:function validateStyle(name,styles){if(process.env.NODE_ENV!=='production'){for(var prop in styles[name]){StyleSheetValidation.validateStyleProp(prop,styles[name],'StyleSheet '+name);}}}},{key:'addValidStylePropTypes',value:function addValidStylePropTypes(stylePropTypes){for(var key in stylePropTypes){allStylePropTypes[key]=stylePropTypes[key];}}}]);return StyleSheetValidation;}();exports.default=StyleSheetValidation;var styleError=function styleError(message1,style,caller,message2){(0,_warning2.default)(false,message1+'\n'+(caller||'<>')+': '+JSON.stringify(style,null,' ')+(message2||''));};var allStylePropTypes={};StyleSheetValidation.addValidStylePropTypes(_ImageStylePropTypes2.default);StyleSheetValidation.addValidStylePropTypes(_TextStylePropTypes2.default);StyleSheetValidation.addValidStylePropTypes(_TextInputStylePropTypes2.default);StyleSheetValidation.addValidStylePropTypes(_ViewStylePropTypes2.default);StyleSheetValidation.addValidStylePropTypes({appearance:_propTypes.string,clear:_propTypes.string,cursor:_propTypes.string,float:(0,_propTypes.oneOf)(['left','none','right']),font:_propTypes.string,listStyle:_propTypes.string,pointerEvents:_propTypes.string});
2 |
3 |
4 | //////////////////
View compiled
(anonymous function)
node_modules/react-native-web/dist/apis/StyleSheet/index.js:1
> 1 | Object.defineProperty(exports,"__esModule",{value:true});var _flattenStyle=require('./flattenStyle');var _flattenStyle2=_interopRequireDefault(_flattenStyle);var _registry=require('./registry');var _registry2=_interopRequireDefault(_registry);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}if(process.env.NODE_ENV!=='production'){var _require=require('fbjs/lib/ExecutionEnvironment'),canUseDOM=_require.canUseDOM;if(canUseDOM&&window.__REACT_DEVTOOLS_GLOBAL_HOOK__){window.__REACT_DEVTOOLS_GLOBAL_HOOK__.resolveRNStyle=_flattenStyle2.default;}}var absoluteFillObject={position:'absolute',left:0,right:0,top:0,bottom:0};var absoluteFill=_registry2.default.register(absoluteFillObject);var StyleSheet={absoluteFill:absoluteFill,absoluteFillObject:absoluteFillObject,create:function create(styles){var result={};Object.keys(styles).forEach(function(key){if(process.env.NODE_ENV!=='production'){var StyleSheetValidation=require('./StyleSheetValidation').default;StyleSheetValidation.validateStyle(key,styles);}result[key]=_registry2.default.register(styles[key]);});return result;},flatten:_flattenStyle2.default,getStyleSheets:function getStyleSheets(){return _registry2.default.getStyleSheets();},hairlineWidth:1};exports.default=StyleSheet;
2 |
3 |
4 | //////////////////
View compiled
Object.create
node_modules/react-native-web/dist/apis/StyleSheet/index.js:1
> 1 | Object.defineProperty(exports,"__esModule",{value:true});var _flattenStyle=require('./flattenStyle');var _flattenStyle2=_interopRequireDefault(_flattenStyle);var _registry=require('./registry');var _registry2=_interopRequireDefault(_registry);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}if(process.env.NODE_ENV!=='production'){var _require=require('fbjs/lib/ExecutionEnvironment'),canUseDOM=_require.canUseDOM;if(canUseDOM&&window.__REACT_DEVTOOLS_GLOBAL_HOOK__){window.__REACT_DEVTOOLS_GLOBAL_HOOK__.resolveRNStyle=_flattenStyle2.default;}}var absoluteFillObject={position:'absolute',left:0,right:0,top:0,bottom:0};var absoluteFill=_registry2.default.register(absoluteFillObject);var StyleSheet={absoluteFill:absoluteFill,absoluteFillObject:absoluteFillObject,create:function create(styles){var result={};Object.keys(styles).forEach(function(key){if(process.env.NODE_ENV!=='production'){var StyleSheetValidation=require('./StyleSheetValidation').default;StyleSheetValidation.validateStyle(key,styles);}result[key]=_registry2.default.register(styles[key]);});return result;},flatten:_flattenStyle2.default,getStyleSheets:function getStyleSheets(){return _registry2.default.getStyleSheets();},hairlineWidth:1};exports.default=StyleSheet;
2 |
3 |
4 | //////////////////
View compiled
InlineStyle.generateStyleObject
node_modules/styled-components/lib/models/InlineStyle.js:69
66 | // support, so we'll just disable multiple values here.
67 | // https://github.com/styled-components/css-to-react-native/issues/11
68 | var styleObject = (0, _cssToReactNative2.default)(declPairs, ['borderRadius', 'borderWidth', 'borderColor', 'borderStyle']);
> 69 | var styles = styleSheet.create({
70 | generated: styleObject
71 | });
72 | generated[hash] = styles.generated;
View compiled
StyledNativeComponent.generateAndInjectStyles
node_modules/styled-components/lib/models/StyledNativeComponent.js:95
92 |
93 | var executionContext = this.buildExecutionContext(theme, props);
94 |
> 95 | return inlineStyle.generateStyleObject(executionContext);
96 | };
97 |
98 | BaseStyledNativeComponent.prototype.componentWillMount = function componentWillMount() {
View compiled
StyledNativeComponent.componentWillMount
node_modules/styled-components/lib/models/StyledNativeComponent.js:120
117 | });
118 | } else {
119 | var _theme = this.props.theme || {};
> 120 | var generatedStyles = this.generateAndInjectStyles(_theme, this.props);
121 | this.setState({ theme: _theme, generatedStyles: generatedStyles });
122 | }
123 | };
View compiled
(anonymous function)
node_modules/react-dom/lib/ReactCompositeComponent.js:347
344 | if (inst.componentWillMount) {
345 | if (process.env.NODE_ENV !== 'production') {
346 | measureLifeCyclePerf(function () {
> 347 | return inst.componentWillMount();
348 | }, debugID, 'componentWillMount');
349 | } else {
350 | inst.componentWillMount();
View compiled
measureLifeCyclePerf
node_modules/react-dom/lib/ReactCompositeComponent.js:75
72 |
73 | ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType);
74 | try {
> 75 | return fn();
76 | } finally {
77 | ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType);
78 | }
View compiled
ReactCompositeComponentWrapper.performInitialMount
node_modules/react-dom/lib/ReactCompositeComponent.js:346
343 |
344 | if (inst.componentWillMount) {
345 | if (process.env.NODE_ENV !== 'production') {
> 346 | measureLifeCyclePerf(function () {
347 | return inst.componentWillMount();
348 | }, debugID, 'componentWillMount');
349 | } else {
View compiled
ReactCompositeComponentWrapper.mountComponent
node_modules/react-dom/lib/ReactCompositeComponent.js:257
254 | if (inst.unstable_handleError) {
255 | markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context);
256 | } else {
> 257 | markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
258 | }
259 |
260 | if (inst.componentDidMount) {
View compiled
Object.mountComponent
node_modules/react-dom/lib/ReactReconciler.js:45
42 | ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);
43 | }
44 | }
> 45 | var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);
46 | if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {
47 | transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
48 | }
View compiled
ReactDOMComponent.mountChildren
node_modules/react-dom/lib/ReactMultiChild.js:236
233 | if (process.env.NODE_ENV !== 'production') {
234 | selfDebugID = getDebugID(this);
235 | }
> 236 | var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID);
237 | child._mountIndex = index++;
238 | mountImages.push(mountImage);
239 | }
View compiled
ReactDOMComponent._createInitialChildren
node_modules/react-dom/lib/ReactDOMComponent.js:703
700 | DOMLazyTree.queueText(lazyTree, contentToUse);
701 | }
702 | } else if (childrenToUse != null) {
> 703 | var mountImages = this.mountChildren(childrenToUse, transaction, context);
704 | for (var i = 0; i < mountImages.length; i++) {
705 | DOMLazyTree.queueChild(lazyTree, mountImages[i]);
706 | }
View compiled
ReactDOMComponent.mountComponent
node_modules/react-dom/lib/ReactDOMComponent.js:522
519 | }
520 | this._updateDOMProperties(null, props, transaction);
521 | var lazyTree = DOMLazyTree(el);
> 522 | this._createInitialChildren(transaction, props, context, lazyTree);
523 | mountImage = lazyTree;
524 | } else {
525 | var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props);
View compiled
Object.mountComponent
node_modules/react-dom/lib/ReactReconciler.js:45
42 | ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);
43 | }
44 | }
> 45 | var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);
46 | if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {
47 | transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
48 | }
View compiled
ReactCompositeComponentWrapper.performInitialMount
node_modules/react-dom/lib/ReactCompositeComponent.js:370
367 | );
368 | this._renderedComponent = child;
369 |
> 370 | var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);
371 |
372 | if (process.env.NODE_ENV !== 'production') {
373 | if (debugID !== 0) {
View compiled
ReactCompositeComponentWrapper.mountComponent
node_modules/react-dom/lib/ReactCompositeComponent.js:257
254 | if (inst.unstable_handleError) {
255 | markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context);
256 | } else {
> 257 | markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
258 | }
259 |
260 | if (inst.componentDidMount) {
View compiled
Object.mountComponent
node_modules/react-dom/lib/ReactReconciler.js:45
42 | ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);
43 | }
44 | }
> 45 | var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);
46 | if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {
47 | transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
48 | }
View compiled
ReactCompositeComponentWrapper.performInitialMount
node_modules/react-dom/lib/ReactCompositeComponent.js:370
367 | );
368 | this._renderedComponent = child;
369 |
> 370 | var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);
371 |
372 | if (process.env.NODE_ENV !== 'production') {
373 | if (debugID !== 0) {
View compiled
ReactCompositeComponentWrapper.mountComponent
node_modules/react-dom/lib/ReactCompositeComponent.js:257
254 | if (inst.unstable_handleError) {
255 | markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context);
256 | } else {
> 257 | markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
258 | }
259 |
260 | if (inst.componentDidMount) {
View compiled
Object.mountComponent
node_modules/react-dom/lib/ReactReconciler.js:45
42 | ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);
43 | }
44 | }
> 45 | var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);
46 | if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {
47 | transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
48 | }
View compiled
ReactCompositeComponentWrapper.performInitialMount
node_modules/react-dom/lib/ReactCompositeComponent.js:370
367 | );
368 | this._renderedComponent = child;
369 |
> 370 | var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);
371 |
372 | if (process.env.NODE_ENV !== 'production') {
373 | if (debugID !== 0) {
View compiled
ReactCompositeComponentWrapper.mountComponent
node_modules/react-dom/lib/ReactCompositeComponent.js:257
254 | if (inst.unstable_handleError) {
255 | markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context);
256 | } else {
> 257 | markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
258 | }
259 |
260 | if (inst.componentDidMount) {
View compiled
Object.mountComponent
node_modules/react-dom/lib/ReactReconciler.js:45
42 | ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);
43 | }
44 | }
> 45 | var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);
46 | if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {
47 | transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
48 | }
View compiled
ReactCompositeComponentWrapper.performInitialMount
node_modules/react-dom/lib/ReactCompositeComponent.js:370
367 | );
368 | this._renderedComponent = child;
369 |
> 370 | var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);
371 |
372 | if (process.env.NODE_ENV !== 'production') {
373 | if (debugID !== 0) {
View compiled
ReactCompositeComponentWrapper.mountComponent
node_modules/react-dom/lib/ReactCompositeComponent.js:257
254 | if (inst.unstable_handleError) {
255 | markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context);
256 | } else {
> 257 | markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
258 | }
259 |
260 | if (inst.componentDidMount) {
View compiled
Object.mountComponent
node_modules/react-dom/lib/ReactReconciler.js:45
42 | ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);
43 | }
44 | }
> 45 | var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);
46 | if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {
47 | transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
48 | }
View compiled
mountComponentIntoNode
node_modules/react-dom/lib/ReactMount.js:104
101 | console.time(markerName);
102 | }
103 |
> 104 | var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context, 0 /* parentDebugID */
105 | );
106 |
107 | if (markerName) {
View compiled
ReactReconcileTransaction.perform
node_modules/react-dom/lib/Transaction.js:143
140 | // one of these calls threw.
141 | errorThrown = true;
142 | this.initializeAll(0);
> 143 | ret = method.call(scope, a, b, c, d, e, f);
144 | errorThrown = false;
145 | } finally {
146 | try {
View compiled
batchedMountComponentIntoNode
node_modules/react-dom/lib/ReactMount.js:126
123 | var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(
124 | /* useCreateElement */
125 | !shouldReuseMarkup && ReactDOMFeatureFlags.useCreateElement);
> 126 | transaction.perform(mountComponentIntoNode, null, componentInstance, container, transaction, shouldReuseMarkup, context);
127 | ReactUpdates.ReactReconcileTransaction.release(transaction);
128 | }
129 |
View compiled
ReactDefaultBatchingStrategyTransaction.perform
node_modules/react-dom/lib/Transaction.js:143
140 | // one of these calls threw.
141 | errorThrown = true;
142 | this.initializeAll(0);
> 143 | ret = method.call(scope, a, b, c, d, e, f);
144 | errorThrown = false;
145 | } finally {
146 | try {
View compiled
Object.batchedUpdates
node_modules/react-dom/lib/ReactDefaultBatchingStrategy.js:62
59 | if (alreadyBatchingUpdates) {
60 | return callback(a, b, c, d, e);
61 | } else {
> 62 | return transaction.perform(callback, null, a, b, c, d, e);
63 | }
64 | }
65 | };
View compiled
Object.batchedUpdates
node_modules/react-dom/lib/ReactUpdates.js:97
94 |
95 | function batchedUpdates(callback, a, b, c, d, e) {
96 | ensureInjected();
> 97 | return batchingStrategy.batchedUpdates(callback, a, b, c, d, e);
98 | }
99 |
100 | /**
View compiled
Object._renderNewRootComponent
node_modules/react-dom/lib/ReactMount.js:319
316 | // rendering, in componentWillMount or componentDidMount, will be batched
317 | // according to the current batching strategy.
318 |
> 319 | ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, componentInstance, container, shouldReuseMarkup, context);
320 |
321 | var wrapperID = componentInstance._instance.rootID;
322 | instancesByReactRootID[wrapperID] = componentInstance;
View compiled
Object._renderSubtreeIntoContainer
node_modules/react-dom/lib/ReactMount.js:401
398 | }
399 |
400 | var shouldReuseMarkup = containerHasReactMarkup && !prevComponent && !containerHasNonRootReactChild;
> 401 | var component = ReactMount._renderNewRootComponent(nextWrappedElement, container, shouldReuseMarkup, nextContext)._renderedComponent.getPublicInstance();
402 | if (callback) {
403 | callback.call(component);
404 | }
View compiled
Object.render
node_modules/react-dom/lib/ReactMount.js:422
419 | * @return {ReactComponent} Component instance rendered in `container`.
420 | */
421 | render: function (nextElement, container, callback) {
> 422 | return ReactMount._renderSubtreeIntoContainer(null, nextElement, container, callback);
423 | },
424 |
425 | /**
View compiled
Object../src/index.js
src/index.js:5
2 | import ReactDOM from "react-dom";
3 | import App from "./App";
4 |
> 5 | ReactDOM.render(<App />, document.getElementById("root"));
6 |
7 |
8 |
View compiled
▶ 6 stack frames were collapsed.
This screen is visible only in development. It will not appear if the app crashes in production.
Open your browser’s developer console to further inspect this error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment