useEffect(() => { // Fetch chapter data from API or database fetch(`/api/manga/chapters/${chapterId}`) .then(response => response.json()) .then(data => setChapter(data)); }, [chapterId]);
useEffect(() => { // Fetch chapter data from API or database fetch(`/api/manga/chapters/${chapterId}`) .then(response => response.json()) .then(data => setChapter(data)); }, [chapterId]);