1.0.8 • Published 5 years ago

booga v1.0.8

Weekly downloads
4
License
ISC
Repository
github
Last release
5 years ago

booga

Manage redux state with sugar js

WebApp that sums and subs numbers from an state

import Store from 'booga';
import { Component } from 'react';

let store = Store({
    storage: Store.localStorage('TESTING_LOCALSTORAGE'),
    initial: {
        count: 10
    }
});

store.count = (c) => c < 0? 0 : c;

export default class Testing extends Component {

    constructor (props) {
        super(props);

        this.state = store(this, {
            count: 'count'
        });
    }

    render () {
        return (
            <div>
                <h1>{ this.state.count }</h1>
                <button onClick={ () => store.count++ }>+</button>
                <button onClick={ () => store.count-- }>-</button>
            </div>
        );
    }
    
}
1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago