import { useAppDispatch, useAppSelector } from "@/app/store" import { deleteProduct, selectProducts, updateProduct } from "@/features/product/productSlice" import { Product } from "@/lib/product"; import { FlatList, SafeAreaView, StyleSheet, Text } from "react-native"; import { ProductEditorItem } from "./ProductEditorItem"; import React from "react"; export const ProductEditor = ({}) => { const products = useAppSelector(selectProducts) as Product []; const dispatch = useAppDispatch(); function onProductDeleted(product_id: string) { dispatch(deleteProduct(product_id)); } function onProductUpdated(product_id: string, product: Product) { dispatch(updateProduct(product)); } return ( Hello { return ( ) } } /> ) } const styles = StyleSheet.create({ product: { } })