# lite-redux

> Redux Connect for Web Components

Latest version **1.0.1** (published 2020-04-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install lite-redux
pnpm add lite-redux
yarn add lite-redux
bun add lite-redux
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-04-08 |
| First published | 2020-04-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Arthur Islamov |
| Maintainers | realiarthur |
| Keywords | redux, connect, web components, custom element, hoc, webcomponents |

## Links

- npm: https://www.npmjs.com/package/lite-redux
- Repository: https://github.com/realiarthur/lite-redux
- Homepage: https://github.com/realiarthur/lite-redux#readme
- Issues: https://github.com/realiarthur/lite-redux/issues
- npm.io page: https://npm.io/package/lite-redux

## Recent versions

- 1.0.1 (latest) — 2020-04-08
- 1.0.0 — 2020-04-03

## README

# Redux Connect for Web Components  [![](https://img.shields.io/npm/v/lite-redux.svg?style=flat)](https://www.npmjs.com/package/lite-redux) ![](https://img.shields.io/bundlephobia/minzip/lite-redux.svg?style=flat)

Redux Connect HOC for Web Components. It's also works for LitElement.

## Usage

The function that is exported from the package gets store as an argument and returns connect HoC, which you can use just like the standard Redux connect (e.g. react-redux). Simple usage looks like this:

```js
import connect from "lite-redux";
...

connect(store)(mapStateToProps, mapDispatchToProps)(Component)
```

But it is more concise to make connect with store and use it everywhere in your project:

```js
// store.js
import { createStore, combineReducers } from "redux";
import makeConnect from "lite-redux";

const reducer = combineReducers({ ... });

const store = createStore(reducer);

export default store;

export const connect = makeConnect(store);
```

```js
// Component.js
import { connect } from "./store";

class Component extends WhatEver {
    ...
}

export default connect(mapStateToProps, mapDispatchToProps)(Component)

```

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