Skip to content

0.81.0 without framework not support #265

@phalera

Description

@phalera

Describe the bug
After I upgraded to 0.81.0 and added the babel configuration of 'nativewind/babel', the project would report an error when using the FlatList component in react-native-gesture-handler or the Animated in react-native-reanimated.
software-mansion/react-native-gesture-handler#3675
software-mansion/react-native-reanimated#8087

Reproduction

import React from 'react';
import { View, Text, StyleSheet } from 'react-native';
import { FlatList, GestureHandlerRootView } from 'react-native-gesture-handler';

const DATA = [
  { id: '1', text: 'Item 1' },
  { id: '2', text: 'Item 2' },
  { id: '3', text: 'Item 3' },
  { id: '4', text: 'Item 4' },
  { id: '5', text: 'Item 5' },
];

const App = () => {
  return (
    <GestureHandlerRootView style={styles.container}>
      <FlatList
        data={DATA}
        keyExtractor={(item) => item.id}
        renderItem={({ item }) => (
          <View style={styles.listItem}>
            <Text style={styles.text}>{item.text}</Text>
          </View>
        )}
      />
    </GestureHandlerRootView>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    paddingTop: 50,
  },
  listItem: {
    padding: 20,
    margin: 2,
    backgroundColor: '#f8f8f8',
    borderBottomWidth: 1,
    borderColor: '#eee',
  },
  text: {
    fontSize: 18,
  },
});

export default App;

⚠️ Important: Issues without a valid reproduction link will not be reviewed and will be automatically closed. Provide one of the following:

If you have a usage question, please use the Discord or GitHub Discussions instead.

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here. If applicable, add screenshots to help explain your problem.

Metadata

Metadata

Assignees

Labels

needs reproductionIssue needs a minimal reproduction before it can be worked on

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions