chainable-components icon indicating copy to clipboard operation
chainable-components copied to clipboard

Parity with recompose

Open pfgray opened this issue 6 years ago • 0 comments

Addresses #23

Progress:

hoc explanation
mapProps() this is just cc.map(a => b)
withProps() this is just CC.of({})
🤔 withPropsOnChange()
withHandlers()
defaultProps() is just CC.of({})
renameProp() is just cc.map(a => b)
renameProps() is just cc.map(a => b)
flattenProp() is just cc.map(a => b)
withState()
🤔 withStateHandlers()
withReducer()
branch() is just fork()
renderComponent() is just fork(true ), maybe could add a special case?
renderNothing() is just fork(true, () => null
🚧 shouldUpdate()
pure() is just pure() … not sure this is a good one to promote, though?
onlyUpdateForKeys() is just pure()
🤷‍♀️ onlyUpdateForPropTypes()
withContext()
getContext()
lifecycle() withLifecycle()
:anguished: toClass()
toRenderProps()
fromRenderProps()

pfgray avatar Apr 25 '19 12:04 pfgray