zhangjin-007 / plume2

πŸš€a lightweight React state container for web and app

Home Page:https://hufeng.github.io/plume2/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

plume πŸš€πŸš€

light weight framework for mobile web

NPM

Getting Started

yarn add plume2 #npm install plume2

quick demo

class HelloActor extends Actor {
  defaultState() {
    return {text: 'hello world'}
  }
}

class AppStore extends Store {
  bindActor() {
    return [new HelloActor]
  }
}

@Relax
class Text extends React.Component {
  static relaxProps = {
    text: 'text'
  };

  render() {
    const {text} = this.props.relaxProps
    return <div>{text}</div>
  }
}


@StoreProvider(AppStore)
class HelloApp extends React.Component {
  render() {
    return <Text/>
  }
}

ReactDOM.render(<HelloApp/>, document.getElementById('app'))

About

πŸš€a lightweight React state container for web and app

https://hufeng.github.io/plume2/

License:BSD 2-Clause "Simplified" License


Languages

Language:TypeScript 100.0%