Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make propHook.what accept a function #10

Open
tajo opened this issue Dec 17, 2019 · 3 comments
Open

Make propHook.what accept a function #10

tajo opened this issue Dec 17, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@tajo
Copy link
Member

tajo commented Dec 17, 2019

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().

@tajo tajo added the enhancement New feature or request label Dec 17, 2019
@gergelyke gergelyke assigned gergelyke and unassigned gergelyke Dec 18, 2019
@raunofreiberg
Copy link
Contributor

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

@tajo
Copy link
Member Author

tajo commented Feb 4, 2020

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.

@parssak
Copy link

parssak commented Jan 2, 2023

Any updates on this? @raunofreiberg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants