createAgent
Factory function creates the agent component
Params
areaName
: String: Name of the areabearingPropOrBuilder
: String|function|undefined: Name of the prop which contain string which identify the agent or bearing builder function
Examples
There multiple agent possible to render in different places of react within same through area. Each agent must have unique identifier - a bearing key which may be holded is some prop. In this example we hold bearing key in prop id
:
In some cases one prop is not enough flexible to unique identify agent within the area. For such case bearing builder function is specifing instead of name of prop:
For such case container may enumerate all the area items:
Notice
The createAgent()
is appropriate for more simple usage and prform additional checking. For better performance consider to use advanced version: createAdvAgent()
Last updated