Created
November 10, 2017 18:05
-
-
Save Lodo4ka/46d98ebe7e3ad710273535f9268f9868 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 | }; | |
47 | | |
48 | var createPath = exports.createPath = function createPath(location) { | |
> 49 | var pathname = location.pathname, | |
50 | search = location.search, | |
51 | hash = location.hash; | |
52 | | |
View compiled | |
createHref | |
node_modules/history/createHashHistory.js:182 | |
179 | // Public interface | |
180 | | |
181 | var createHref = function createHref(location) { | |
> 182 | return '#' + encodePath(basename + (0, _PathUtils.createPath)(location)); | |
183 | }; | |
184 | | |
185 | var push = function push(path, state) { | |
View compiled | |
Link.render | |
node_modules/react-router-dom/es/Link.js:69 | |
66 | | |
67 | invariant(this.context.router, 'You should not use <Link> outside a <Router>'); | |
68 | | |
> 69 | var href = this.context.router.history.createHref(typeof to === 'string' ? { pathname: to } : to); | |
70 | | |
71 | return React.createElement('a', _extends({}, props, { onClick: this.handleClick, href: href, ref: innerRef })); | |
72 | }; | |
View compiled | |
finishClassComponent | |
node_modules/react-dom/cjs/react-dom.development.js:7882 | |
7879 | var nextChildren = void 0; | |
7880 | { | |
7881 | ReactDebugCurrentFiber.setCurrentPhase('render'); | |
> 7882 | nextChildren = instance.render(); | |
7883 | ReactDebugCurrentFiber.setCurrentPhase(null); | |
7884 | } | |
7885 | // React DevTools reads this flag. | |
View compiled | |
updateClassComponent | |
node_modules/react-dom/cjs/react-dom.development.js:7859 | |
7856 | } else { | |
7857 | shouldUpdate = updateClassInstance(current, workInProgress, renderExpirationTime); | |
7858 | } | |
> 7859 | return finishClassComponent(current, workInProgress, shouldUpdate, hasContext); | |
7860 | } | |
7861 | | |
7862 | function finishClassComponent(current, workInProgress, shouldUpdate, hasContext) { | |
View compiled | |
beginWork | |
node_modules/react-dom/cjs/react-dom.development.js:8233 | |
8230 | case FunctionalComponent: | |
8231 | return updateFunctionalComponent(current, workInProgress); | |
8232 | case ClassComponent: | |
> 8233 | return updateClassComponent(current, workInProgress, renderExpirationTime); | |
8234 | case HostRoot: | |
8235 | return updateHostRoot(current, workInProgress, renderExpirationTime); | |
8236 | case HostComponent: | |
View compiled | |
performUnitOfWork | |
node_modules/react-dom/cjs/react-dom.development.js:10215 | |
10212 | { | |
10213 | ReactDebugCurrentFiber.setCurrentFiber(workInProgress); | |
10214 | } | |
> 10215 | var next = beginWork(current, workInProgress, nextRenderExpirationTime); | |
10216 | { | |
10217 | ReactDebugCurrentFiber.resetCurrentFiber(); | |
10218 | } | |
View compiled | |
workLoop | |
node_modules/react-dom/cjs/react-dom.development.js:10279 | |
10276 | if (nextRenderExpirationTime <= mostRecentCurrentTime) { | |
10277 | // Flush all expired work. | |
10278 | while (nextUnitOfWork !== null) { | |
> 10279 | nextUnitOfWork = performUnitOfWork(nextUnitOfWork); | |
10280 | } | |
10281 | } else { | |
10282 | // Flush asynchronous work until the deadline runs out of time. | |
View compiled | |
HTMLUnknownElement.callCallback | |
node_modules/react-dom/cjs/react-dom.development.js:540 | |
537 | // nested call would trigger the fake event handlers of any call higher | |
538 | // in the stack. | |
539 | fakeNode.removeEventListener(evtType, callCallback, false); | |
> 540 | func.apply(context, funcArgs); | |
541 | didError = false; | |
542 | } | |
543 | | |
View compiled | |
invokeGuardedCallbackDev | |
node_modules/react-dom/cjs/react-dom.development.js:579 | |
576 | // errors, it will trigger our global error handler. | |
577 | var evt = document.createEvent('Event'); | |
578 | evt.initEvent(evtType, false, false); | |
> 579 | fakeNode.dispatchEvent(evt); | |
580 | | |
581 | if (didError) { | |
582 | if (!didSetError) { | |
View compiled | |
invokeGuardedCallback | |
node_modules/react-dom/cjs/react-dom.development.js:436 | |
433 | * @param {...*} args Arguments for function | |
434 | */ | |
435 | invokeGuardedCallback: function (name, func, context, a, b, c, d, e, f) { | |
> 436 | invokeGuardedCallback.apply(ReactErrorUtils, arguments); | |
437 | }, | |
438 | | |
439 | /** | |
View compiled | |
renderRoot | |
node_modules/react-dom/cjs/react-dom.development.js:10357 | |
10354 | var didError = false; | |
10355 | var error = null; | |
10356 | { | |
> 10357 | invokeGuardedCallback$1(null, workLoop, null, expirationTime); | |
10358 | if (hasCaughtError()) { | |
10359 | didError = true; | |
10360 | error = clearCaughtError(); | |
View compiled | |
performWorkOnRoot | |
node_modules/react-dom/cjs/react-dom.development.js:10963 | |
10960 | root.remainingExpirationTime = commitRoot(finishedWork); | |
10961 | } else { | |
10962 | root.finishedWork = null; | |
> 10963 | finishedWork = renderRoot(root, expirationTime); | |
10964 | if (finishedWork !== null) { | |
10965 | // We've completed the root. Commit it. | |
10966 | root.remainingExpirationTime = commitRoot(finishedWork); | |
View compiled | |
performWork | |
node_modules/react-dom/cjs/react-dom.development.js:10916 | |
10913 | // the deadlne. | |
10914 | findHighestPriorityRoot(); | |
10915 | while (nextFlushedRoot !== null && nextFlushedExpirationTime !== NoWork && (minExpirationTime === NoWork || nextFlushedExpirationTime <= minExpirationTime) && !deadlineDidExpire) { | |
> 10916 | performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime); | |
10917 | // Find the next highest priority work. | |
10918 | findHighestPriorityRoot(); | |
10919 | } | |
View compiled | |
requestWork | |
node_modules/react-dom/cjs/react-dom.development.js:10832 | |
10829 | | |
10830 | // TODO: Get rid of Sync and use current time? | |
10831 | if (expirationTime === Sync) { | |
> 10832 | performWork(Sync, null); | |
10833 | } else if (!isCallbackScheduled) { | |
10834 | isCallbackScheduled = true; | |
10835 | scheduleDeferredCallback(performAsyncWork); | |
View compiled | |
scheduleWorkImpl | |
node_modules/react-dom/cjs/react-dom.development.js:10715 | |
10712 | nextUnitOfWork = null; | |
10713 | nextRenderExpirationTime = NoWork; | |
10714 | } | |
> 10715 | requestWork(root, expirationTime); | |
10716 | } else { | |
10717 | { | |
10718 | if (!isErrorRecovery && fiber.tag === ClassComponent) { | |
View compiled | |
scheduleWork | |
node_modules/react-dom/cjs/react-dom.development.js:10677 | |
10674 | } | |
10675 | | |
10676 | function scheduleWork(fiber, expirationTime) { | |
> 10677 | return scheduleWorkImpl(fiber, expirationTime, false); | |
10678 | } | |
10679 | | |
10680 | function scheduleWorkImpl(fiber, expirationTime, isErrorRecovery) { | |
View compiled | |
scheduleTopLevelUpdate | |
node_modules/react-dom/cjs/react-dom.development.js:11140 | |
11137 | next: null | |
11138 | }; | |
11139 | insertUpdateIntoFiber(current, update); | |
> 11140 | scheduleWork(current, expirationTime); | |
11141 | } | |
11142 | | |
11143 | function findHostInstance(fiber) { | |
View compiled | |
updateContainer | |
node_modules/react-dom/cjs/react-dom.development.js:11178 | |
11175 | container.pendingContext = context; | |
11176 | } | |
11177 | | |
> 11178 | scheduleTopLevelUpdate(current, element, callback); | |
11179 | }, | |
11180 | | |
11181 | | |
View compiled | |
(anonymous function) | |
node_modules/react-dom/cjs/react-dom.development.js:15190 | |
15187 | root = container._reactRootContainer = newRoot; | |
15188 | // Initial mount should not be batched. | |
15189 | DOMRenderer.unbatchedUpdates(function () { | |
> 15190 | DOMRenderer.updateContainer(children, newRoot, parentComponent, callback); | |
15191 | }); | |
15192 | } else { | |
15193 | DOMRenderer.updateContainer(children, root, parentComponent, callback); | |
View compiled | |
unbatchedUpdates | |
node_modules/react-dom/cjs/react-dom.development.js:11049 | |
11046 | isUnbatchingUpdates = false; | |
11047 | } | |
11048 | } | |
> 11049 | return fn(); | |
11050 | } | |
11051 | | |
11052 | // TODO: Batching should be implemented at the renderer level, not within | |
View compiled | |
renderSubtreeIntoContainer | |
node_modules/react-dom/cjs/react-dom.development.js:15189 | |
15186 | var newRoot = DOMRenderer.createContainer(container, shouldHydrate); | |
15187 | root = container._reactRootContainer = newRoot; | |
15188 | // Initial mount should not be batched. | |
> 15189 | DOMRenderer.unbatchedUpdates(function () { | |
15190 | DOMRenderer.updateContainer(children, newRoot, parentComponent, callback); | |
15191 | }); | |
15192 | } else { | |
View compiled | |
render | |
node_modules/react-dom/cjs/react-dom.development.js:15254 | |
15251 | return renderSubtreeIntoContainer(null, element, container, true, callback); | |
15252 | }, | |
15253 | render: function (element, container, callback) { | |
> 15254 | return renderSubtreeIntoContainer(null, element, container, false, callback); | |
15255 | }, | |
15256 | unstable_renderSubtreeIntoContainer: function (parentComponent, element, containerNode, callback) { | |
15257 | !(parentComponent != null && has(parentComponent)) ? invariant(false, 'parentComponent must be a valid React Component') : void 0; | |
View compiled | |
./src/index.js | |
src/index.js:7 | |
4 | import App from './App'; | |
5 | import registerServiceWorker from './registerServiceWorker'; | |
6 | | |
> 7 | ReactDOM.render(<App />, document.getElementById('root')); | |
8 | registerServiceWorker(); | |
9 | | |
10 | | |
View compiled |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment