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

phy does not parse a function as children properly when no prop provided #26

Closed
yumin-chen opened this issue Sep 11, 2022 · 1 comment
Closed

Comments

@yumin-chen
Copy link

yumin-chen commented Sep 11, 2022

The problem occurs when the component takes a function as children (like the "Consumer/Provider" component)

  • h(Provider, ({data}) => "Rendered ${data}") => renders nothing, expected Rendered ${data}
  • h(Provider, {}, ({data}) => "Rendered ${data}") => Successfully renders Rendered ${data}

Specifically, I was trying it with the ClassNames component from Emotion.js and found it not working unless I add an empty prop object {}.

This seems like a bug with phy.

@yumin-chen
Copy link
Author

Sorry, please ignore this issue. phy works as expected. There's no bug.

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

No branches or pull requests

1 participant