question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Response streaming

See original GitHub issue

As of React 16 a new method renderToStream() method was introduced. I first though of creating a feature request issue at airbnb/hypernova-react but after taking a look at the code it seems that more ground-work needs to be done at the server itself to support streams in the first place.

@goatslacker mentioned in #22 that there are plans to support streams and even async rendering, it would be interesting if this was already started by anyone or if we could support you guys on this feature.

In the latter case it would be nice if we could collect all ideas/hints here on how to implement this feature correctly.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:9

github_iconTop GitHub Comments

3reactions
goatslackercommented, Sep 14, 2017

React 16 is out in beta right now I believe and the stream/async rendering has already landed so feel free to take it for a spin and report back what works/doesn’t work/what you’d like to work/how @Inkdpixels

0reactions
MichalCzcommented, May 19, 2018

Well - looking from outside - you can indeed decode a JSON Object using JSONStream - I made quite a lot implementations using that in reading - in writing my Scramjet…toJSONArray will easily deliver a JSON array (or object via another method) items in realtime while still provinding a proper JSON output for legacy and API use.

Can you elaborate a little on the code - maybe find a nice place to make a proof of concept? I could try and help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is HTTP Streaming and How Does it Work? - PubNub
HTTP Streaming allows a web server to continuously send data to a client over a single HTTP connection that remains open indefinitely.
Read more >
Streaming requests and responses | Apigee Edge
With streaming enabled, request and response payloads are streamed without modification to the client app (for responses) and the target endpoint (for requests) ......
Read more >
Streaming requests with the fetch API - Chrome Developers
Response streams have been available in all modern browsers for a while now. They allow you to access parts of a response as...
Read more >
Using readable streams - Web APIs | MDN
The Request.body and Response.body properties are available, which are getters exposing the body contents as a readable stream.
Read more >
Streaming HTTP Responses - Ivanti
The low-level function response.flush() should not be used to manage HTTP responses. Ivanti recommends using the http.stream.* functions instead. If you wish ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found