London Escorts sunderland escorts 1v1.lol unblocked yohoho 76 https://www.symbaloo.com/mix/yohoho?lang=EN yohoho https://www.symbaloo.com/mix/agariounblockedpvp https://yohoho-io.app/ https://www.symbaloo.com/mix/agariounblockedschool1?lang=EN
5.9 C
New York
Friday, November 15, 2024

android – NativeViewGestureHandler should be used as a descendant of GestureHandlerRootView. In any other case the gestures won’t be acknowledged


I am new to React Native and presently engaged on a easy Todo app. Nonetheless, I am encountering a difficulty associated to gestures. Particularly, I am getting the next error

NativeViewGestureHandler should be used as a descendant of GestureHandlerRootView. In any other case, the gestures won’t be acknowledged.

Here is the related code for my app.

import { useState } from "react";
import { StyleSheet, Textual content, View, FlatList } from "react-native";

export default perform Index() {
  const [todos, setTodos] = useState([
    { text: 'buy coffee', key: '1' },
    { text: 'create an app', key: '2' },
    { text: 'play cricket', key: '3' },
  ]);

  return (
    <View type={kinds.container}>
      <View type={kinds.content material}>
        <View type={kinds.checklist}>
          <FlatList
            information={todos}
            renderItem={({ merchandise }) => (
              <Textual content>{merchandise.textual content}</Textual content>
            )}
          />
        </View>
      </View>
    </View>
  );
}

const kinds = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff'
  },
  content material: {
    padding: 40
  },
  checklist: {
    marginTop: 20
  }
});

What I’ve tried:
I’ve wrapped my root element in GestureHandlerRootView however the error persists.
I’ve made positive to put in and hyperlink react-native-gesture-handler accurately.

What am I lacking? How can I repair this error and combine gesture handlers correctly in my app?

Related Articles

Social Media Auto Publish Powered By : XYZScripts.com