# @types/redux-ui

> TypeScript definitions for redux-ui

Latest version **0.0.21** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/redux-ui
pnpm add @types/redux-ui
yarn add @types/redux-ui
bun add @types/redux-ui
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.21 |
| Published | 2023-11-07 |
| First published | 2016-08-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51442 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/redux-ui
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redux-ui
- npm.io page: https://npm.io/package/@types/redux-ui

## Dependencies (2)

- [redux](https://npm.io/package/redux.md) ^3.6.0
- [@types/react](https://npm.io/package/@types/react.md) *

## Recent versions

- 0.0.21 (latest) — 2023-11-07
- 0.0.18 (ts3.8) — 2021-12-24
- 0.0.17 (ts3.7) — 2021-07-08
- 0.0.16 (ts2.8) — 2019-11-11
- 0.0.14 (ts2.6) — 2018-02-12
- 0.0.13 (ts2.3) — 2017-10-25
- 0.0.9 (ts2.1) — 2017-03-31
- 0.0.7 (ts2.0) — 2017-02-23
- 0.0.20 — 2023-10-18
- 0.0.19 — 2023-09-27
- 0.0.15 — 2018-08-06
- 0.0.12 — 2017-09-01
- 0.0.11 — 2017-08-31
- 0.0.10 — 2017-06-23
- 0.0.8 — 2017-03-07
- … 6 more at https://npm.io/package/@types/redux-ui/versions

## README

# Installation
> `npm install --save @types/redux-ui`

# Summary
This package contains type definitions for redux-ui (https://github.com/tonyhb/redux-ui).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redux-ui.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redux-ui/index.d.ts)
````ts
/// <reference types="react" />
import * as Redux from "redux";

export interface uiParams<UIStateShape> {
    // optional key which is used to determine the UI path in which state will
    // be stored. if omitted this is randomly generated.
    key?: string | undefined;

    // optional persist, defaults to false. if set to true persist will keep UI
    // state for this component after it unmounts. if set to false the UI state
    // will be deleted and recreated when the component remounts
    persist?: boolean | undefined;

    // **required**: UI state for the component
    state: UIStateShape;

    // customReducer: you can handle the UI state for this component's scope
    // by dispatching actions
    reducer?(state: any, action: any): any;

    // optional mergeProps passed to react-redux' @connect
    mergeProps?(stateProps: any, dispatchProps: any, ownProps: any): any;

    // optional `options` passed to react-redux @connect
    options?: {
        pure?: boolean | undefined;
        withRef?: boolean | undefined;
    } | undefined;
}

export interface ReduxUIProps<UIStateShape> {
    // The key passed to the decorator from the decorator
    // (eg. 'some-decorator' with `@ui('some-decorator')`
    uiKey: string;

    // The UI state for the component's `uiKey`
    ui: UIStateShape;

    // A function accepting either a name/value pair or object which updates
    // state within `uiKey`
    updateUI(obj: UIStateShape): void;
    updateUI(key: string, value: any): void;

    // A function which resets the state within `uiKey` to its default
    resetUI(): void;
}

export const reducer: Redux.Reducer<any>;

export default function ui<UIStateShape>(params?: uiParams<UIStateShape>): <T>(component: T) => T;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: [@types/react](https://npmjs.com/package/@types/react), [redux](https://npmjs.com/package/redux)

# Credits
These definitions were written by .

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