Skip to content

Commit

Permalink
Adding FlowFixMe when switching between Component and Ref
Browse files Browse the repository at this point in the history
Reviewed By: yungsters

Differential Revision: D7215800

fbshipit-source-id: 175f769a2b1fc67e72b10e113a96eb4167437ab0
  • Loading branch information
elicwhite authored and facebook-github-bot committed Mar 9, 2018
1 parent a48b4d5 commit 25b8ec8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Libraries/Lists/VirtualizedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,10 @@ class VirtualizedList extends React.PureComponent<Props, State> {
cellKey={this._getCellKey() + '-header'}
key="$header">
<View onLayout={this._onLayoutHeader} style={inversionStyle}>
{/*
Flow doesn't know this is a React.Element and not a React.Component
$FlowFixMe https://fburl.com/b9xmtm09
*/}
{element}
</View>
</VirtualizedCellWrapper>,
Expand Down Expand Up @@ -857,6 +861,10 @@ class VirtualizedList extends React.PureComponent<Props, State> {
key="$empty"
onLayout={this._onLayoutEmpty}
style={inversionStyle}>
{/*
Flow doesn't know this is a React.Element and not a React.Component
$FlowFixMe https://fburl.com/b9xmtm09
*/}
{element}
</View>,
);
Expand All @@ -873,6 +881,10 @@ class VirtualizedList extends React.PureComponent<Props, State> {
cellKey={this._getCellKey() + '-footer'}
key="$footer">
<View onLayout={this._onLayoutFooter} style={inversionStyle}>
{/*
Flow doesn't know this is a React.Element and not a React.Component
$FlowFixMe https://fburl.com/b9xmtm09
*/}
{element}
</View>
</VirtualizedCellWrapper>,
Expand Down

0 comments on commit 25b8ec8

Please sign in to comment.