- Props :
object
- SimpleTransformation ⇒
Props
- HigherOrderComponent ⇒
React.Component
- Transformation :
SimpleTransformation
|object
transform-props-with~default([transformations]) ⇒ HigherOrderComponent
Higher-order component generator. Will change props with passed transformaton(s). Array of transformatons is evaluated left to right.
Kind: inner method of transform-props-with
Param | Type | Default |
---|---|---|
[transformations] | Transformation | Array.<Transformation> |
[] |
A plain object. Should not be mutated.
SimpleTransformation ⇒ Props
Middleware function for changing props. A function which takes Props as input and returns new Props.
Kind: global typedef
Param | Type |
---|---|
oldProps | Props |
Higher-order React Component. A function that enhances passed component.
Kind: global typedef
Param | Type |
---|---|
BaseComponent | React.Component |
Transformation : SimpleTransformation
| object
When a plane object is passed it will be used to extend props (with override).
Kind: global typedef