> For the complete documentation index, see [llms.txt](https://mgcrea.gitbook.io/redux-rest-resource/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mgcrea.gitbook.io/redux-rest-resource/advanced/pureactions.md).

# Pure Actions

You can create pure actions that won't perform any HTTP request and only impact the state.

* You can configure pure actions with the `isPure` option, a `reduce` option must be set:

```javascript
const url = 'https://foo.com/users/:id';
export const {types, actions, reducers} = createResource({
  name: 'user',
  url,
  actions: {
    clear: {isPure: true, reduce: (state, action) => ({...state, item: null})}
  }
});
```

* It will generate the following action creators:

```javascript
// Action creators available to interact with your REST resource
Object.keys(actions) == ['clearUser'];
```

* That will always run your custom reducer

```javascript
state ==
  {
    item: null
  };
```
