import React from 'react'; import { Button, FlatList, Text, View } from 'react-native'; import { useRecoilValue, useResetRecoilState } from 'recoil'; import { artistsState, useUpdateArtists } from '../state/artists'; import { Artist } from '../models/music'; const ArtistItem: React.FC<{ item: Artist } > = ({ item }) => ( {item.id} {item.name} ); const List = () => { const artists = useRecoilValue(artistsState); const renderItem: React.FC<{ item: Artist }> = ({ item }) => ( ); return ( item.id} /> ); } const ListPlusControls = () => { const resetArtists = useResetRecoilState(artistsState); const updateArtists = useUpdateArtists(); return (