api.md
August 11, 2015 ยท View on GitHub
API
stampit(React [,descObj])
Return a factory function (called a stamp) that will produce new React components using the prototypes that are passed in or composed.
@param {Object} ReactThe React library.@param {Object} descObjA map of property names and values specialized for React.@return {Function} stampA factory to produce React components using the given properties.@return {Object} stamp.fixedAn object map containing the fixed prototypes.@return {Function} stamp.composeAdd mixin (stamp) to stamp. Chainable.
stamp.compose([arg1] [,arg2] [,arg3...])
Take one or more stamps produced from react-stampit or stampit and
combine them with this to produce and return a new stamp.
@param {...Function} stampOne or more stamps.@return {Function}A new stamp composed fromthisand arguments.
Utility methods
compose([arg1], [arg2] [,arg3...])
Take two or more stamps produced from react-stampit or stampit and
combine them to produce and return a new stamp.
@param {...Function} stampTwo or more stamps.@return {Function}A new stamp composed from arguments.
isStamp(obj)
Take an object and return true if it's a stamp, false otherwise.
API Differences
react-stampit utitlizes a stamp description object made specifically for React components. Consider it a long lost relative of stampit's stamp description object with nothing in common.
react-stampit has also stripped all of stampit's static methods to enforce an API familiar to React users. Users are encouraged to utilize React's lifecycle and component properties as replacements for these methods.