Adamnaeman: Hi guys, Sorry for interrupt. I got a problem where my page does not repond to the TMDB API. The link youtube is the tutorial that I follow. For the FlatList component where the props is renderItem, I can make MovieCard appear in index page but I cannot make MovieCard appear in search page.
At timing 1:46:00 https://www.youtube.com/watch?v=f8Z9JyB2EIE&t=6602s
could you check if the api returns valid result?
like console log the result
no
no result?
it don show any respond from console.log
index show, while search not show
const {
data: movies = [],
loading,
error,
refetch: loadMovies,
reset,
} = useFetch(() => fetchMovies({ query: searchQuery }), false);
in the search could you console log these parts
and check the results
useEffect(() => {
console.log("Fetched Movies:", movies);
}, [movies]);
useEffect(() => {
console.log("Loading:", loading);
}, [loading]);
add these to your search code then search some data
LOG Fetched Movies: null LOG Loading: false
this is when the screen loads or when you type something?
screens loads
from the youtube video it should had appear just like the index page
since i got he problem, i stopped the tutorial and try to fix the code first
it has been 2 hours for me to try fix the code
i mean to check the result when you type some words or a movie name
no, it don appear
so the problem is in the fetching the movies check if api is working or find a another provider
Recommended threads
- listDocuments is deprecated. What should...
``` const database = new Databases(client); export const updateSearchCount = async (query: string, movie: Movie) => { const result = await database.listDoc...
- Questions about requests count on dashbo...
Hi guys I am new to this platform so I dont know if I am doing anything wrong. On dsahboard the request count is about 50k even though I dont feel like I have d...
- Account.get throwing an error on EXPO SD...
I am updating my react app to use EXPO SDK 54 and appwrite-react-native SDK 0.17.x but the account.get() function is not working I use it to get the current us...