> For the complete documentation index, see [llms.txt](https://refract.js.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://refract.js.org/usage/installation.md).

# Installation

Refract is available for a number of reactive programming libraries. For each library, a Refract integration is available for React, Inferno, Preact and Redux.

Available packages:

|                                                   | [React](https://github.com/facebook/react) | [Inferno](https://infernojs.org/) | [Preact](https://preactjs.com/) | [Redux](https://github.com/reduxjs/redux) |
| ------------------------------------------------- | ------------------------------------------ | --------------------------------- | ------------------------------- | ----------------------------------------- |
| [**Callbag**](https://github.com/callbag/callbag) | refract-callbag                            | refract-inferno-callbag           | refract-preact-callbag          | refract-redux-callbag                     |
| [**Most**](https://github.com/cujojs/most)        | refract-most                               | refract-inferno-most              | refract-preact-most             | refract-redux-most                        |
| [**RxJS**](https://github.com/reactivex/rxjs)     | refract-rxjs                               | refract-inferno-rxjs              | refract-preact-rxjs             | refract-redux-rxjs                        |
| [**xstream**](https://github.com/staltz/xstream)  | refract-xstream                            | refract-inferno-xstream           | refract-preact-xstream          | refract-redux-xstream                     |

The examples below assume you're using `RxJS` - if you're using a different library, use the table above to find the correct package names.

## React, Inferno and Preact Packages

The React, Inferno and Preact packages don't require much set up - you just need to install the package (usually via `npm` or `yarn`):

```
npm install --save refract-rxjs
```

The same applies to Inferno and Preact packages.

## Redux Packages

The Redux packages involve an extra step to apply the Refract enhancer to your Redux store:

1. Install the latest stable version (again usually via `npm` or `yarn`):

   ```
   npm install --save refract-redux-rxjs
   ```
2. Import the Refract store enhancer and apply it to your redux store. This process is explained in detail in the Redux documentation: [Configuring your store](https://redux.js.org/recipes/configuring-your-store).

   For example:

   ```javascript
   import { compose, createStore } from 'redux'
   import { refractEnhancer } from 'refract-redux-rxjs'

   import reducers from './store'

   const store = createStore(reducers, {}, refractEnhancer())

   export default store
   ```

   *(Note that this example is unrealistically simple!)*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://refract.js.org/usage/installation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
