mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Replace $FlowFixMeProps in UnimplementedView (#48810)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48810 Changelog: [General][Changed] - Improved Props type in UnimplementedView Reviewed By: cortinico Differential Revision: D68437542 fbshipit-source-id: 134b834d77f65a94a6488c21298d79b060ea8109
This commit is contained in:
committed by
Facebook GitHub Bot
parent
cd7a30ce48
commit
b200c7cb2f
+9
-1
@@ -9,14 +9,22 @@
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
import type {ViewStyleProp} from '../../StyleSheet/StyleSheet';
|
||||
|
||||
import StyleSheet from '../../StyleSheet/StyleSheet';
|
||||
import * as React from 'react';
|
||||
|
||||
type Props = $ReadOnly<{
|
||||
style?: ?ViewStyleProp,
|
||||
children?: React.Node,
|
||||
...
|
||||
}>;
|
||||
|
||||
/**
|
||||
* Common implementation for a simple stubbed view. Simply applies the view's styles to the inner
|
||||
* View component and renders its children.
|
||||
*/
|
||||
class UnimplementedView extends React.Component<$FlowFixMeProps> {
|
||||
class UnimplementedView extends React.Component<Props> {
|
||||
render(): React.Node {
|
||||
// Workaround require cycle from requireNativeComponent
|
||||
const View = require('../View/View');
|
||||
|
||||
@@ -3897,7 +3897,12 @@ declare export default typeof UnimplementedNativeViewNativeComponent;
|
||||
`;
|
||||
|
||||
exports[`public API should not change unintentionally Libraries/Components/UnimplementedViews/UnimplementedView.js 1`] = `
|
||||
"declare class UnimplementedView extends React.Component<$FlowFixMeProps> {
|
||||
"type Props = $ReadOnly<{
|
||||
style?: ?ViewStyleProp,
|
||||
children?: React.Node,
|
||||
...
|
||||
}>;
|
||||
declare class UnimplementedView extends React.Component<Props> {
|
||||
render(): React.Node;
|
||||
}
|
||||
declare module.exports: UnimplementedView;
|
||||
|
||||
Reference in New Issue
Block a user