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.
  • Loading branch information
Pranav-yadav committed Feb 7, 2023
1 parent 7adf6b1 commit a6ce399
Show file tree
Hide file tree
Showing 24 changed files with 1,082 additions and 950 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';
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 @@ -11,8 +11,8 @@
import type {SectionBase} from '../../Lists/SectionList';
import type {AnimatedComponentType} from '../createAnimatedComponent';

import SectionList from '../../Lists/SectionList';
import createAnimatedComponent from '../createAnimatedComponent';
import {SectionList} from '@react-native/flat-lists';
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 '@react-native/virtualized-lists';
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').FlatList;
const React = require('react');

const LISTVIEW_CELL_HEIGHT = 15;
Expand Down
Loading

0 comments on commit a6ce399

Please sign in to comment.