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

setState #58

Open
1rosehip opened this issue Feb 6, 2018 · 1 comment
Open

setState #58

1rosehip opened this issue Feb 6, 2018 · 1 comment

Comments

@1rosehip
Copy link

1rosehip commented Feb 6, 2018

Hello,
Is it possible to check state changes or call setState function with the lib?

Thanks

@billneff79
Copy link
Collaborator

@1rosehip It is not possible as far as I can tell. As you can see in the code snippet here, classful (i.e. stateful) components a created anew on each render and are not preserved in any manner, do not support an interface for updating state, not are they returned so that you can interrogate the classes after they are rendered.

https://github.com/developit/preact-render-to-string/blob/ef7b0a260f3bf834a7deaf4cb5e8016610c57ed4/src/index.js#L70-L78

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

2 participants