> For the complete documentation index, see [llms.txt](https://api.frontity.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.frontity.org/frontity-packages/collections-packages/hooks.md).

# @frontity/hooks

This package is a collection of React hooks that have proven to be pretty useful for a Frontity project.

## Table of Contents

* [Installation](/frontity-packages/collections-packages/hooks.md#installation)
* [How to use](/frontity-packages/collections-packages/hooks.md#how-to-use)
* [Hooks](/frontity-packages/collections-packages/hooks.md#hooks)

## Installation

Add the `@frontity/hooks` package to your project:

```
npm i @frontity/hooks
```

## How to use

In order to use it, you just have to import the hook you want to use in your theme from `@frontity/hooks` and place it wherever needed. For example, if we want to use the `useInView` hook:

```javascript
import useInView from "@frontity/hooks/use-in-view";
```

## Hooks

These are the hooks available from the package `@frontity/hooks`

* [**Intersection Observer Hooks**](/frontity-packages/collections-packages/hooks/intersection-observer-hooks.md)
  * [`useInView`](/frontity-packages/collections-packages/hooks/intersection-observer-hooks.md#useinview)
* [**Infinite Scroll Hooks**](/frontity-packages/collections-packages/hooks/infinite-scroll-hooks.md)
  * [`useInfiniteScroll`](/frontity-packages/collections-packages/hooks/infinite-scroll-hooks.md#useinfinitescroll)
  * [`useArchiveInfiniteScroll`](/frontity-packages/collections-packages/hooks/infinite-scroll-hooks.md#usearchiveinfinitescroll)
  * [`usePostTypeInfiniteScroll`](/frontity-packages/collections-packages/hooks/infinite-scroll-hooks.md#useposttypeinfinitescroll)
