> For the complete documentation index, see [llms.txt](https://repertoire.gitbook.io/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://repertoire.gitbook.io/home/api-reference/dispatchactions.md).

# dispatchActions

The `dispatchActions` utility can be used to manually connect  the Redux store state or dispatch actions to a component which is not directly linked to a controller, by using the [connect()](https://github.com/reduxjs/react-redux/blob/master/docs/api.md#connectmapstatetoprops-mapdispatchtoprops-mergeprops-options) utility.

```jsx
import React, {Component} from 'react';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {dispatchActions} from 'repertoire'

class User extends Component {
  render() {
    return <div />;
  } 
}

const mapStateToProps = state => ({
  users: state.admin.users
});

const mapDispatchToProps = dispatch => bindActionCreators({
  setCurrentUser: dispatchActions.setCurrentUser
}, dispatch);

export default connect(mapStateToProps, mapDispatchToProps)(User);
  
```
