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