unistore微型集中式状态容器
unistore 是一个微型(650B)的集中式状态容器。
特性
非常小却很好地遵循了 Preact 的步伐
类似 Redux 的熟悉的命名和思路
有用的数据选择器,可从状态中提取属性
便携式的操作,可移动到一个通用的地方并导入
简化是唯一目标
Usage
import { Provider, createStore, connect } from 'unistore' let store = createStore({ count: 0 }) // If actions is a function, it gets passed the store: let actions = store => ({ // Actions can just return a state update: increment(state) { return { count: state.count+1 } }, // The above example as an Arrow Function: increment2: ({ count }) => ({ count: count+1 }), // Async actions can be pure async/promise functions: async getStuff(state) { let res = await fetch('/foo.json') return { stuff: await res.json() } }, // ... or just actions that call store.setState() later: incrementAsync(state) { setTimeout( () => { store.setState({ count: state.count+1 }) }, 100) } }) const App = connect('count', actions)( ({ count, increment }) => ( <div> <p>Count: {count}</p> <button onClick={increment}>Increment</button> </div> ) ) export default () => ( <Provider store={store}> <App /> </Provider> )
评论
LIoC微型Ioc容器
Loonframework-InversionofControl(简称LIoC),是一款基于Java反射机制的“微型”Ioc实现,部分参考了另外一个IoC实现yan项目,LIoC能够运行在JRE1.4
LIoC微型Ioc容器
0
redux可预测的 JS 状态容器
Redux是JavaScript应用程序的可预测状态容器。(不要与WordPress框架——Redux框架混淆。)它可以帮助您编写行为一致、在不同环境(客户机、服务器和本机)中运行且易于测试的应用程序
redux可预测的 JS 状态容器
0
Puppet集中式系统管理
Puppet是Linux、Unix和Windows系统的自动管理引擎,它根据集中式规范执行管理任务(例如添加用户、安装软件包和更新服务器配置)。Puppet的简单陈述规范语言的能力提供了强大的clas
Puppet集中式系统管理
0
zLogFabric集中式日志存储系统
zLogFabric是一个集成的跨平台日志解决方案,通过消息系统收集各个应用的日志信息存储到一个集中式的系统中。模块化的设计使得服务器可对日志进行存储、转发、警报以及生成日志统计信息。zLogFabr
zLogFabric集中式日志存储系统
0