aboutsummaryrefslogtreecommitdiff
path: root/node_modules/react-dom/lib/ReactServerUpdateQueue.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-10-14 18:40:54 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-10-14 18:40:54 +0200
commit9df98e65f842cf3acae09cbdd969966f42d64469 (patch)
treef071d3e09a342c208fb8e1cd3f5241d64fbfbaf3 /node_modules/react-dom/lib/ReactServerUpdateQueue.js
parent008926b18470e7f394cd640302957b29728a9803 (diff)
update dependencies
Diffstat (limited to 'node_modules/react-dom/lib/ReactServerUpdateQueue.js')
-rw-r--r--node_modules/react-dom/lib/ReactServerUpdateQueue.js138
1 files changed, 0 insertions, 138 deletions
diff --git a/node_modules/react-dom/lib/ReactServerUpdateQueue.js b/node_modules/react-dom/lib/ReactServerUpdateQueue.js
deleted file mode 100644
index cab66992c..000000000
--- a/node_modules/react-dom/lib/ReactServerUpdateQueue.js
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- * Copyright 2015-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- *
- */
-
-'use strict';
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-var ReactUpdateQueue = require('./ReactUpdateQueue');
-
-var warning = require('fbjs/lib/warning');
-
-function warnNoop(publicInstance, callerName) {
- if (process.env.NODE_ENV !== 'production') {
- var constructor = publicInstance.constructor;
- process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0;
- }
-}
-
-/**
- * This is the update queue used for server rendering.
- * It delegates to ReactUpdateQueue while server rendering is in progress and
- * switches to ReactNoopUpdateQueue after the transaction has completed.
- * @class ReactServerUpdateQueue
- * @param {Transaction} transaction
- */
-
-var ReactServerUpdateQueue = function () {
- function ReactServerUpdateQueue(transaction) {
- _classCallCheck(this, ReactServerUpdateQueue);
-
- this.transaction = transaction;
- }
-
- /**
- * Checks whether or not this composite component is mounted.
- * @param {ReactClass} publicInstance The instance we want to test.
- * @return {boolean} True if mounted, false otherwise.
- * @protected
- * @final
- */
-
-
- ReactServerUpdateQueue.prototype.isMounted = function isMounted(publicInstance) {
- return false;
- };
-
- /**
- * Enqueue a callback that will be executed after all the pending updates
- * have processed.
- *
- * @param {ReactClass} publicInstance The instance to use as `this` context.
- * @param {?function} callback Called after state is updated.
- * @internal
- */
-
-
- ReactServerUpdateQueue.prototype.enqueueCallback = function enqueueCallback(publicInstance, callback, callerName) {
- if (this.transaction.isInTransaction()) {
- ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName);
- }
- };
-
- /**
- * Forces an update. This should only be invoked when it is known with
- * certainty that we are **not** in a DOM transaction.
- *
- * You may want to call this when you know that some deeper aspect of the
- * component's state has changed but `setState` was not called.
- *
- * This will not invoke `shouldComponentUpdate`, but it will invoke
- * `componentWillUpdate` and `componentDidUpdate`.
- *
- * @param {ReactClass} publicInstance The instance that should rerender.
- * @internal
- */
-
-
- ReactServerUpdateQueue.prototype.enqueueForceUpdate = function enqueueForceUpdate(publicInstance) {
- if (this.transaction.isInTransaction()) {
- ReactUpdateQueue.enqueueForceUpdate(publicInstance);
- } else {
- warnNoop(publicInstance, 'forceUpdate');
- }
- };
-
- /**
- * Replaces all of the state. Always use this or `setState` to mutate state.
- * You should treat `this.state` as immutable.
- *
- * There is no guarantee that `this.state` will be immediately updated, so
- * accessing `this.state` after calling this method may return the old value.
- *
- * @param {ReactClass} publicInstance The instance that should rerender.
- * @param {object|function} completeState Next state.
- * @internal
- */
-
-
- ReactServerUpdateQueue.prototype.enqueueReplaceState = function enqueueReplaceState(publicInstance, completeState) {
- if (this.transaction.isInTransaction()) {
- ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState);
- } else {
- warnNoop(publicInstance, 'replaceState');
- }
- };
-
- /**
- * Sets a subset of the state. This only exists because _pendingState is
- * internal. This provides a merging strategy that is not available to deep
- * properties which is confusing. TODO: Expose pendingState or don't use it
- * during the merge.
- *
- * @param {ReactClass} publicInstance The instance that should rerender.
- * @param {object|function} partialState Next partial state to be merged with state.
- * @internal
- */
-
-
- ReactServerUpdateQueue.prototype.enqueueSetState = function enqueueSetState(publicInstance, partialState) {
- if (this.transaction.isInTransaction()) {
- ReactUpdateQueue.enqueueSetState(publicInstance, partialState);
- } else {
- warnNoop(publicInstance, 'setState');
- }
- };
-
- return ReactServerUpdateQueue;
-}();
-
-module.exports = ReactServerUpdateQueue; \ No newline at end of file