concent

concent

  • Docs
  • API
  • ChangeLog
  • GitHub

›顶层api

顶层api

  • run
  • configure
  • cloneModule
  • register
  • connect
  • connectDumb
  • emit
  • emitWith
  • dispatch
  • getState
  • getGlobalState
  • getComputed
  • setState
  • setGlobalState
  • call
  • execute
  • executeAll

通用类型解释

  • HandlerCtx
  • CcFragmentCtx
  • WatchFn

实例上下文api

  • ctx.dispatch
  • ctx.invoke
  • ctx.setState
  • ctx.setModuleState
  • ctx.setGlobalState
  • ctx.computed
  • ctx.watch
  • ctx.syncBool
  • ctx.set
  • ctx.emit
  • ctx.on
  • ctx.off

CcFragment api

  • Fifth Document

通用api

  • dispatch

获取store里的全局模块的状态


获取store里的全部模块的数据

全局模块$$global是concent的内置模块

函数签名

getGlobalState: ()=>object

如果使用

import { getGlobalState } from 'concent';
// import cc from 'concent'; cc.getGlobalState

getGlobalState();

等同于写为

import { getState } from 'concent';
getState('$$global');

console里使用

打开浏览器console窗口,输入cc.getGlobalState即可以console里使用该接口

← getStategetComputed →
  • 函数签名
  • 如果使用
  • console里使用
Copyright © 2019 concentjs.org