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

Ability to use with function components? #212

Closed
bradjones1 opened this issue Dec 12, 2021 · 3 comments
Closed

Ability to use with function components? #212

bradjones1 opened this issue Dec 12, 2021 · 3 comments
Labels

Comments

@bradjones1
Copy link
Contributor

I'm not the world's greatest React developer, but it seems to me that this is only compatible with class components? The closest analog I can find is React Context, which does provide a wrapper component for use with function components. Anything similar to that possible, here?

@hongaar
Copy link
Contributor

hongaar commented Dec 21, 2021

Hi @bradjones1, thanks for raising this issue. This package is not actively developed (anymore) but it should be possible to use the withData function with React function components. Let me know if you experience problems with this approach and if possible, provide a codesandbox of the code you tried.

@bradjones1
Copy link
Contributor Author

You're right, this is just my inexperience speaking. Thanks for the reply.

@hongaar
Copy link
Contributor

hongaar commented Dec 22, 2021

NP!

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

No branches or pull requests

2 participants