mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Reorganize files
This is just moving a bunch of DOM files. It moves things into dom/stack and dom/fiber respectively. The dom/stack folder remains split into client/server. Mainly the shared folder is now my best guess for files that we can reuse in fiber. Everything else will get forked or reimplemented. Also moved the event system out of renderers/shared/stack and into renderers/shared/shared.
This commit is contained in:
1 parent
b26168cadb
commit
a3fb0310ca
116 files changed
+1
-1
No files matched your search
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* Copyright 2013-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.
|
||||
*
|
||||
* @providesModule ReactDOMStackInjection
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var ReactComponentEnvironment = require('ReactComponentEnvironment');
|
||||
var ReactComponentBrowserEnvironment =
|
||||
require('ReactComponentBrowserEnvironment');
|
||||
var ReactDOMComponent = require('ReactDOMComponent');
|
||||
var ReactDOMEmptyComponent = require('ReactDOMEmptyComponent');
|
||||
var ReactDOMTextComponent = require('ReactDOMTextComponent');
|
||||
var ReactDefaultBatchingStrategy = require('ReactDefaultBatchingStrategy');
|
||||
var ReactEmptyComponent = require('ReactEmptyComponent');
|
||||
var ReactHostComponent = require('ReactHostComponent');
|
||||
var ReactReconcileTransaction = require('ReactReconcileTransaction');
|
||||
var ReactUpdates = require('ReactUpdates');
|
||||
|
||||
var alreadyInjected = false;
|
||||
|
||||
function inject() {
|
||||
if (alreadyInjected) {
|
||||
// TODO: This is currently true because these injections are shared between
|
||||
// the client and the server package. They should be built independently
|
||||
// and not share any injection state. Then this problem will be solved.
|
||||
return;
|
||||
}
|
||||
alreadyInjected = true;
|
||||
|
||||
ReactHostComponent.injection.injectGenericComponentClass(
|
||||
ReactDOMComponent
|
||||
);
|
||||
|
||||
ReactHostComponent.injection.injectTextComponentClass(
|
||||
ReactDOMTextComponent
|
||||
);
|
||||
|
||||
ReactEmptyComponent.injection.injectEmptyComponentFactory(
|
||||
function(instantiate) {
|
||||
return new ReactDOMEmptyComponent(instantiate);
|
||||
}
|
||||
);
|
||||
|
||||
ReactUpdates.injection.injectReconcileTransaction(
|
||||
ReactReconcileTransaction
|
||||
);
|
||||
ReactUpdates.injection.injectBatchingStrategy(
|
||||
ReactDefaultBatchingStrategy
|
||||
);
|
||||
|
||||
ReactComponentEnvironment.injection.injectEnvironment(ReactComponentBrowserEnvironment);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
inject: inject,
|
||||
};
|
||||
Reference in new issue
Block a user