preact-jsx-chai
preact-jsx-chai copied to clipboard
setState
Hello, Is it possible to check state changes or call setState function with the lib?
Thanks
@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