Skip to content

Valtio with class components #69

Answered by dai-shi
AjaxSolutions asked this question in Q&A
Discussion options

You must be logged in to vote

Well, useProxy is only for function components.
It would be too tricky (or too much effort) to directly subscribe from class components.
I'd recommend wrapping a class component with a function component and useProxy.
It would be worth trying, and I'd encourage you to create such an example. 💪

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@dai-shi
Comment options

Answer selected by AjaxSolutions
Comment options

You must be logged in to vote
1 reply
@costas-basdekis
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants