# regular-state

> an SPA(single page application) foundation for regularjs that powerd by stateman

Latest version **0.6.1** (published 2020-08-20) · MIT license · 410 weekly downloads

## Install

```sh
npm install regular-state
pnpm add regular-state
yarn add regular-state
bun add regular-state
```

## 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.6.1 |
| Published | 2020-08-20 |
| First published | 2015-02-05 |
| Weekly downloads | 410 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 327.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | leeluolee |
| Maintainers | leeluolee |
| Keywords | stateman, regularjs, state, spa |

## Links

- npm: https://www.npmjs.com/package/regular-state
- Repository: https://github.com/regularjs/regular-state
- Issues: https://github.com/regularjs/regular-state/issues
- npm.io page: https://npm.io/package/regular-state

## Dependencies (1)

- [stateman](https://npm.io/package/stateman.md) ^0.3.0-beta.2

## Alternatives

- [@reckona/mreact-store](https://npm.io/package/@reckona/mreact-store.md) — 976 weekly downloads
- [@pacote/flux-actions](https://npm.io/package/@pacote/flux-actions.md) — 65 weekly downloads
- [@pilotlab/lux-debug](https://npm.io/package/@pilotlab/lux-debug.md) — 39 weekly downloads
- [vue-persist-state](https://npm.io/package/vue-persist-state.md) — 19 weekly downloads
- [xmodel-svelte](https://npm.io/package/xmodel-svelte.md) — 4 weekly downloads

## Recent versions

- 0.6.1 (latest) — 2020-08-20
- 0.6.0-beta.9 — 2018-06-21
- 0.6.0-beta.8 — 2017-09-04
- 0.6.0-beta.7 — 2017-05-09
- 0.6.0-beta.6 — 2017-04-26
- 0.6.0-beta.5 — 2017-03-27
- 0.6.0-beta.4 — 2017-03-15
- 0.6.0-beta.3 — 2017-02-24
- 0.6.0-beta.2 — 2017-02-09
- 0.6.0-beta.1 — 2017-02-08
- 0.5.1 — 2017-01-19
- 0.2.1 — 2016-07-12
- 0.0.1-beta.1 — 2016-02-15
- 0.2.0 — 2015-12-15
- 0.0.1 — 2015-02-05

## README

# regular-state

**regular-state**是整合了 [Regularjs(MVVM组件框架)](https://github.com/regularjs/regular)和 [Stateman(基于状态抽象的路由库)](https://github.com/leeluolee/stateman)的单页系统框架，它支持**服务端渲染(Server side Rendering)**


## 指南

[文档指南](http://regularjs.github.io/regular-state/)

## 特性

- **服务端渲染支持**
- 基于层级状态的**多层路由**支持, 可动态增删路由节点
- **异步路由**支持，每个生命周期都可以异步处理
- 支持**异步View**加载(依赖模块系统支持)
- **强大路径匹配**, 类express语法
- 三种方案(history/hashchange/iframe轮训)的**自动降级与升级**
- 低版本支持(需引入Promise Polyfill)


## 浏览器支持

**regular-state**可运行在支持ES5的浏览器，并且需要Promise的支持. 低级浏览器请使用类似[promise-polyfill](https://github.com/taylorhakes/promise-polyfill)的垫片脚本

## TODO

# 低版本IE的fallback
# Promise 
# default 
# notfound
# 单双引号， 属性设置有坑
# isRunning 有坑
# run 需要try 太白痴了

## 贡献

- 文档使用markdown格式编写, 使用gitbook维护,  仓库地址(https://github.com/regularjs/doc/regular-state)

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