react-with-moxy
react-with-moxy copied to clipboard
feat: rendering to a node stream
renderInitialBlockand renderRemainingBlock need better naming.
Closes #38
One huge disadvantage of using streaming is that we no longer have proper 500 status codes. If react fails during the streaming, we can no longer set the status because the headers were already sent. Additionally, calling res.destroy(err) ends the request but there's no way to distinguish between a "canceled" reply or a normal reply. This is a huge deal unfortunately.