Skip to content

Commit

Permalink
Feat: Move FlatLists to @react-native/flat-lists package
Browse files Browse the repository at this point in the history
Summary: This diff moves `FlatList` and `SectionList` to a new package `@react-native/flat-lists`.
         This is a first step towards moving all the `FlatList`-related code to a separate package.
         This will allow us to make changes to the `FlatList` implementation without affecting the rest of the React Native codebase.

Changelog:  [General] [Changed] - Move `FlatList`s to `@react-native/flat-lists` package.
            `FlatList` and `SectionList` are now available in `@react-native/flat-lists` package.
            **Warning**: This is a breaking(?) change, and you will need to update your imports to use the new package.

[skip ci]
  • Loading branch information
Pranav-yadav committed Nov 23, 2022
1 parent 138af74 commit 6103302
Show file tree
Hide file tree
Showing 28 changed files with 814 additions and 1,000 deletions.
2 changes: 1 addition & 1 deletion Libraries/Animated/components/AnimatedFlatList.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

import type {AnimatedComponentType} from '../createAnimatedComponent';

import FlatList from '../../Lists/FlatList';
import createAnimatedComponent from '../createAnimatedComponent';
import FlatList from '@react-native/flat-lists/Lists/FlatList';
import * as React from 'react';

/**
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Animated/components/AnimatedSectionList.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

import type {AnimatedComponentType} from '../createAnimatedComponent';

import SectionList from '../../Lists/SectionList';
import createAnimatedComponent from '../createAnimatedComponent';
import SectionList from '@react-native/flat-lists/Lists/FlatList';
import * as React from 'react';

/**
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Inspector/NetworkOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import type {RenderItemProps} from '../Lists/VirtualizedList';
const ScrollView = require('../Components/ScrollView/ScrollView');
const TouchableHighlight = require('../Components/Touchable/TouchableHighlight');
const View = require('../Components/View/View');
const FlatList = require('../Lists/FlatList');
const XHRInterceptor = require('../Network/XHRInterceptor');
const StyleSheet = require('../StyleSheet/StyleSheet');
const Text = require('../Text/Text');
const WebSocketInterceptor = require('../WebSocket/WebSocketInterceptor');
const FlatList = require('@react-native/flat-lists/Lists/FlatList');
const React = require('react');

const LISTVIEW_CELL_HEIGHT = 15;
Expand Down
Loading

0 comments on commit 6103302

Please sign in to comment.