import { StyleSheet, Text, View, Button, TouchableHighlight } from 'react-native'; import { StatusBar } from 'expo-status-bar'; import React, { useState, useEffect } from "react"; import { FlatList } from 'react-native-gesture-handler'; import {useDispatch, useSelector} from 'react-redux'; import { ThunkAction } from 'redux-thunk'; //? possiblement à supprimer import { Card, getAllCards } from "../redux/actions/getAllCards" export const DATA = [ { id: '1', title: "premier élément", }, { id: '2', title: "second élément", }, { id: '3', title: "élément", }, { id: '4', title: "Rick", }, { id: '5', title: "Corentin", }, { id: '10', title: "dernier élément", }, ]; //@ts-ignore const Item = ({title}) => ( {title} ); //@ts-ignore export default function ListScreen({navigation}){ const [count, setCount] = useState(0); // // Initialize the binding content with the application initial state // //@ts-ignore // const nList = useSelector(state => state.cards); // // Create a const that will hold the react-redux events dispatcher // const dispatch = useDispatch(); // // Let's define a hook that will be used to update the rendered state after the return will be called // // You cannot perform side-effects outside of a useEffect hook // useEffect(() => { // const loadCards = async () => { // await dispatch(getAllCards()); // }; // loadCards(); // }, [dispatch]); return ( Maman, prend la caméra ! ! {count}