Web Hooks For Next
MangaHook provides a set of custom hooks to simplify the integration of the MangaHook API into Next.js applications. These hooks facilitate the retrieval of manga data for various purposes. Here’s a detailed documentation for each hook:
1. useMangaList
Purpose
This hook is designed to fetch a list of manga titles with associated metadata using the /api/mangalist
endpoint.
Parameters
params
(optional): Additional parameters to customize the manga list request.
Usage
2. useManga
Purpose
This hook fetches detailed information about a specific manga using the /api/manga/:id
endpoint.
Parameters
id
: Unique identifier for the desired manga.
Usage
3. useMangaChapter
Purpose
This hook fetches details about a specific chapter of a manga using the /api/manga/:id/:ch
endpoint.
Parameters
id
: Unique identifier for the manga.ch
: Unique identifier for the desired chapter.
Usage
4. useMangaSearch
Purpose
This hook allows users to search for manga titles using the /api/search/:query
endpoint.
Parameters
params
: The search query string.
Usage
These custom hooks can be seamlessly integrated into Next.js applications, making it easy to retrieve and manage manga data within your components. Customize parameters and handle the returned data according to your application’s needs.