Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ximing/boron

The flow-control goodness for mini program
https://github.com/ximing/boron

Last synced: 9 days ago
JSON representation

The flow-control goodness for mini program

Awesome Lists containing this project

README

        

## install
```javascript
npm i --save mp-boron
```

## Usage

### App
```javascript
import {App as AppFn} from 'mp-boron';

App(
AppFn({
async onLaunch(){},
async onShow(){}
})
)
```

### Page
```javascript
import {Page as PageFn ,App as AppFn} from 'mp-boron';

Page(
PageFn({
async onLoad(){} ,
async onReady(){},
async onShow(){}
})
)
```
Asynchronous life cycle sequence is:

> app onLaunch -> app onShow -> page onLoad -> page onReady -> page onShow