diff --git a/Libraries/Components/StaticContainer.react.js b/Libraries/Components/StaticContainer.react.js index dc852849c1d61f..4772dd4af482cc 100644 --- a/Libraries/Components/StaticContainer.react.js +++ b/Libraries/Components/StaticContainer.react.js @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. * * @format - * @flow + * @flow strict-local */ 'use strict'; @@ -27,8 +27,19 @@ const React = require('React'); * Typically, you will not need to use this component and should opt for normal * React reconciliation. */ -class StaticContainer extends React.Component { - shouldComponentUpdate(nextProps: Object): boolean { + +type Props = $ReadOnly<{| + /** + * Whether or not this component should update. + */ + shouldUpdate: ?boolean, + /** + * Content short-circuited by React reconciliation process. + */ + children: React.Node, +|}>; +class StaticContainer extends React.Component { + shouldComponentUpdate(nextProps: Props): boolean { return !!nextProps.shouldUpdate; }