react-view
react-view copied to clipboard
Make propHook.what accept a function
Today, it's always a string and needs to be an expression. That can get unreadable for some more complex cases.
Explore adding an option to pass a function and stringify it with fn.toString()
.
Do you have any pointers for this one? Would love to give it a shot. I assume something needs to be done here:
https://github.com/uber/react-view/blob/master/src/ast.ts#L52
Yea, that should be the place. You need to check if what
is a function and if so, it needs to be stringified and parsed.
Any updates on this? @raunofreiberg