# @glue42/glux

> ## Install the package

Latest version **0.0.1-alpha.1** (published 2019-08-23) · SEE LICENSE IN LICENSE.MD license · 0 weekly downloads

## Install

```sh
npm install @glue42/glux
pnpm add @glue42/glux
yarn add @glue42/glux
bun add @glue42/glux
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1-alpha.1 |
| Published | 2019-08-23 |
| First published | 2019-08-23 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE.MD |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 434.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ipidov, kiril.popov |
| Keywords | glue42, redux, react, interop |

## Links

- npm: https://www.npmjs.com/package/@glue42/glux
- Repository: https://github.com/Tick42/glux42
- Homepage: https://github.com/Tick42/glux42#readme
- Issues: https://github.com/Tick42/glux42/issues
- npm.io page: https://npm.io/package/@glue42/glux

## Dependencies (1)

- [timm](https://npm.io/package/timm.md) ^1.6.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.1-alpha.1 (latest) — 2019-08-23
- 0.0.1-alpha.0 — 2019-08-23

## README

# Get started with Glux

## Install the package

```
npm install --save @glue42/glux @glue42/desktop redux
```

## Add the Glux reducer

_Note that we expect a `glue` key to be used for the Glux reducer_

```js
// reducers.js
import { createStore, combineReducers } from "redux";
import { glueReducer } from "@glue42/glux";

export const createRootReducer = () =>
  combineReducers({
    glue: glueReducer
  });
```

## Add the Glux middleware

```js
// configureStore.js
import { applyMiddleware, createStore } from 'redux'
import { glueMiddleware } from '@glue42/glux'
import { createRootReducer } from './reducers'

const glueConfig = {
    appManager: 'full',
    windows: true,
    logger: true
}

const middlewares = [
    glueMiddleware(glueConfig)
]

export const configureStore = (initialState) {
    const store = createStore(
        createRootReducer(),
        initialState,
        applyMiddleware(...middlewares)
    )

    return store
}
```

## Start using glue in idiomatic redux way via selectors and actions

```js
import { actions, selectors} from '@glue42/glux';

const Applications = ({ startApplication, applications }) => (
  <table>
    {applications.map(application => (
        <tr>
            <td> {application.name} </td>
            <td>
                <button onClick={() => {startApplication(application)}}>
                    Start
                </button>
            </td>
        </tr>
    )}
  </table>
)

export default connect(
    state => ({
        applications: selectors.getApplications(state)
    }),
    dispatch => ({ ...bindActionCreators(actions, dispatch) })
)(Applications)

```

---
_Source: https://npm.io/package/@glue42/glux · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
