mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-28 08:34:31 +00:00
Update prettier
This commit is contained in:
+1
-1
@@ -55,7 +55,7 @@
|
||||
"file-loader": "^0.11.1",
|
||||
"jest": "^19.0.2",
|
||||
"node-libs-browser": "^0.5.3",
|
||||
"prettier": "^1.0.2",
|
||||
"prettier": "^1.1.0",
|
||||
"react": "~15.4.1",
|
||||
"react-addons-test-utils": "~15.4.1",
|
||||
"react-dom": "~15.4.1",
|
||||
|
||||
@@ -40,25 +40,31 @@ const applyLayout = Component => {
|
||||
const componentDidUpdate = Component.prototype.componentDidUpdate;
|
||||
const componentWillUnmount = Component.prototype.componentWillUnmount;
|
||||
|
||||
Component.prototype
|
||||
.componentDidMount = safeOverride(componentDidMount, function componentDidMount() {
|
||||
this._layoutState = emptyObject;
|
||||
this._isMounted = true;
|
||||
this._onLayoutId = guid();
|
||||
registry[this._onLayoutId] = this;
|
||||
this._handleLayout();
|
||||
});
|
||||
Component.prototype.componentDidMount = safeOverride(
|
||||
componentDidMount,
|
||||
function componentDidMount() {
|
||||
this._layoutState = emptyObject;
|
||||
this._isMounted = true;
|
||||
this._onLayoutId = guid();
|
||||
registry[this._onLayoutId] = this;
|
||||
this._handleLayout();
|
||||
}
|
||||
);
|
||||
|
||||
Component.prototype
|
||||
.componentDidUpdate = safeOverride(componentDidUpdate, function componentDidUpdate() {
|
||||
this._handleLayout();
|
||||
});
|
||||
Component.prototype.componentDidUpdate = safeOverride(
|
||||
componentDidUpdate,
|
||||
function componentDidUpdate() {
|
||||
this._handleLayout();
|
||||
}
|
||||
);
|
||||
|
||||
Component.prototype
|
||||
.componentWillUnmount = safeOverride(componentWillUnmount, function componentWillUnmount() {
|
||||
this._isMounted = false;
|
||||
delete registry[this._onLayoutId];
|
||||
});
|
||||
Component.prototype.componentWillUnmount = safeOverride(
|
||||
componentWillUnmount,
|
||||
function componentWillUnmount() {
|
||||
this._isMounted = false;
|
||||
delete registry[this._onLayoutId];
|
||||
}
|
||||
);
|
||||
|
||||
Component.prototype._handleLayout = function() {
|
||||
const layout = this._layoutState;
|
||||
|
||||
@@ -5012,9 +5012,9 @@ preserve@^0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
|
||||
|
||||
prettier@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.0.2.tgz#84535548fca00cf0acd7ca8296d492352ef167d7"
|
||||
prettier@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.1.0.tgz#9d6ad005703efefa66b6999b8916bfc6afeaf9f8"
|
||||
dependencies:
|
||||
ast-types "0.9.8"
|
||||
babel-code-frame "6.22.0"
|
||||
|
||||
Reference in New Issue
Block a user