Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 798 Bytes

File metadata and controls

27 lines (17 loc) · 798 Bytes

Disallow importing FlatList from react-native due to potential performance concerns or the preference for alternative components (@bam.tech/no-flatlist)

💼 This rule is enabled in the performance config.

🔧 This rule is automatically fixable by the --fix CLI option.

Prevents from using "FlatList" import to avoid performance issues. FlashList should be used instead.

Rule details

Examples of incorrect code for this rule:

import { FlatList } from "react-native";
import { FlatList, SectionList } from "react-native";

Examples of correct alternative for this rule:

import { FlashList } from "@shopify/flash-list";