Module: react-cmf/lib/registry

Internal. This is the core of react-cmf. The registry will register everything from a react component to redux action.
Source:

Members

(inner, constant) Registry :Registry

The registry that will have the singleton - getRegistry() -> the registry which is a simple key/value POJO
Type:
  • Registry
Source:

Methods

(inner) addToRegistry(id, item)

Internal. Call this one to add anything you want into the registry. It will be added only if not locked. Be warned any existing content will be overridden. You should use this to add a new configurable concept to CMF. By default it's internally used to register expression, component and actionCreator
Parameters:
Name Type Description
id string Where you want it to store in the registry to get it later
item any Everything you want, a function, an object or whatever
Source:

(inner) getFromRegistry(id, context) → {any}

Internal: return element registred under the ID.
Parameters:
Name Type Description
id string the object's id in the registry you want to get
context object cmf context
Source:
Returns:
the object you are looking for
Type
any

(inner) getRegisterMany(registerFn)

This function is a curry that return a generic function to register components in registry
Parameters:
Name Type Description
registerFn function a function that register a item in the registry
Source:

(inner) getRegistry(context) → {Registry}

Returns the global registry if no context found. If count is found it returns the context.registry
Parameters:
Name Type Description
context object React context
Source:
Returns:
the registry singleton instance
Type
Registry

(inner) lock()

Lock the registry
Source:

Type Definitions

Registry

Type:
  • Object.<string, *>
Source: