reactjs / React.NET

.NET library for JSX compilation and server-side rendering of React components
https://reactjs.net/
MIT License
2.3k stars 937 forks source link

Node Stream support for react v18? #1265

Closed LorenDorez closed 1 year ago

LorenDorez commented 3 years ago

With the upcoming React v18 i was wondering if much thought has been given about how to implement Node streams. As some of the new features for v18 React.Lazy and React.Suspense will be leveraging a new nodestream https://github.com/reactwg/react-18/discussions/22

i dont have much experence on the node side of this. im not sure where to start with a basic implementation using renderToNodeStream any guidance would be appreciated.

I though about trying to do something with Web sockets and tie into the JS Engines that way but not sure that would work.

dustinsoftware commented 3 years ago

Yeah I’m not sure the embedded v8 engine would support this at all with the current architecture. Might need to revisit some kind of real Node interop later, I believe there was a PR from a while ago that explored making that work.

For now only string based rendering is supported, at least until we sort that path out.

On Thu, Sep 2, 2021 at 16:58, Loren Dorez @.***> wrote:

With the upcoming React v18 i was wondering if much thought has been given about how to implement Node streams. As some of the new features for v18 React.Lazy and React.Suspense will be leveraging a new nodestream reactwg/react-18#22 https://github.com/reactwg/react-18/discussions/22

i dont have much experence on the node side of this. im not sure where to start with a basic implementation using renderToNodeStream any guidance would be appreciated.

I though about trying to do something with Web sockets and tie into the JS Engines that way but not sure that would work.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/reactjs/React.NET/issues/1265, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHGCFVHDQPOH3TZQSNHO4DT77QPLANCNFSM5DJ6FDBQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

LorenDorez commented 3 years ago

Well I see JES has a node engine that could be used but again not sure how you would be able to wireup the cross talk between JSE <> .Net <> Client. I was thinking you could use websockets or signalR to help with the .Net <> Client but not sure the JSE can handle the constant connection between it and .Net