# riotflux

> 修改于 [cheftjs](https://github.com/cheft/cheftjs)的 flux 框架

Latest version **0.1.1** (published 2015-08-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install riotflux
pnpm add riotflux
yarn add riotflux
bun add riotflux
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2015-08-28 |
| First published | 2015-08-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | byg |
| Maintainers | joshuabriter |

## Links

- npm: https://www.npmjs.com/package/riotflux
- npm.io page: https://npm.io/package/riotflux

## Recent versions

- 0.1.1 (latest) — 2015-08-28

## README

# riotflux
修改于 [cheftjs](https://github.com/cheft/cheftjs)的 flux 框架

## Application
    var c = require('riotflux');
    var app = new c.Applicaton({
        router: require('./router.js')
    });    

## Router - [like backbone](http://backbonejs.org/#Router-routes)
    module.exports = {
        routes: {
            '': 'home'
        },
        home: function() {

        }
    }

## Tag - [base on riot](https://github.com/riot/riot)
    <test>
        <script></script>
        <h1>{result}</h1>
        <button onclick={clickMe}>test</button>
    </test>

## Actions
    
    module.exports = {
        actions: {
            clickMe: function() {
                this.result = 'click success!';
                this.trigger('clicked');
            }
        }
    }

## Store

    module.exports = {
        store: ''
    }

or

    module.exports = {
        store: {
            url: '',
            contentType: ''
        }
    }

### method
* get()
* save()
* del()
* post()

## Listeners
    
    module.exports = {
        listeners: {
            init:    function() {}
            mount:   function() {}
            update:  function() {}
            updated: function() {}
            geted  : function(data, status) {}
            posted : function(data, status) {}
            saved  : function(data, status) {}
            deleted: function(data, status) {}
            
            clicked : function() {
                console.log('the tag can auto update');
            }
        }
    }

## Demo
    cd demo
    npm install
    gulp

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