# simple-redux-ts

> [![N|Solid](https://reactjsexample.com/assets/favicon.png)](https://reactjs.org/)

Latest version **1.0.9** (published 2021-06-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install simple-redux-ts
pnpm add simple-redux-ts
yarn add simple-redux-ts
bun add simple-redux-ts
```

## 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.9 |
| Published | 2021-06-10 |
| First published | 2021-04-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | ukungzulfah |
| Keywords | redux |

## Links

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

## Dependencies (3)

- [redux](https://npm.io/package/redux.md) ^4.0.5
- [react-redux](https://npm.io/package/react-redux.md) ^7.2.3
- [redux-thunk](https://npm.io/package/redux-thunk.md) ^2.3.0

## Recent versions

- 1.0.9 (latest) — 2021-06-10
- 1.0.8 — 2021-04-10
- 1.0.7 — 2021-04-10
- 1.0.6 — 2021-04-10
- 1.0.5 — 2021-04-10
- 1.0.4 — 2021-04-10
- 1.0.3 — 2021-04-10
- 1.0.2 — 2021-04-10
- 1.0.1 — 2021-04-10
- 1.0.0 — 2021-04-10

## README

# Redux React Simple
## _Simple Configuration Redux_

[![N|Solid](https://reactjsexample.com/assets/favicon.png)](https://reactjs.org/)


# Setup Redux
```sh
yarn add simple-redux-ts
```
# Then
- Add file to root/src project 
- ``` src/state.json ```
Example :
```
{
    "value": 6
}
```

# Example:
Add script to head ``` index.ts/js ```
```
...
...
import { creteStore, Provider } from 'simple-redux-ts';
...
ReactDOM.render(
    <Provider store={creteStore()}>
        <App />
    </Provider>
, document.getElementById('root'));
```

# Other Component
Use ```this.props.updateState({ ... })```
Access ```value``` with ```this.props.value```
```
import React, { Component } from 'react';
import { connects } from 'simple-redux-ts';
...
...
class App extends Component {
    ...
    ...
    render() {
        return (
            ...
            ...
            <button onClick={() => {
                this.props.updateState({
                    value: this.props.value - 1
                });
            }}>Min</button>
            
            <div>{this.props.value}</div>
            
            <button onClick={() => {
                this.props.updateState({
                    value: this.props.value + 1
                });
            }}>Plus</button>
            ...
            ...
        );
    }
    ...
    ...
}
export default connects(App);
```


## Features

- One Function for update all props
- Use ``` props.updateState({ ... }) ```

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