How to call handler from another?
something like this
withHandlers({
handlerOne: props => value =>
console.log(value)
handlerTwo: props => () => {
handlerOne('Hello, World')
},
@code-by You can use two withHandlers. Props from prev with new handler will be passed to the next one.
if one run my example there will be error
Uncaught ReferenceError: handlerOne is not defined
Call it from props. Of course there's nothing in the scope. It's just properties of the object. Not magic.
I also created a PR https://github.com/acdlite/recompose/pull/401 not sure it will be merged
I'll close this, if anyone want to proceed please write at #401
Most helpful comment
@code-by You can use two withHandlers. Props from prev with new handler will be passed to the next one.