React.NET and React v18 support #1343
Replies: 6 comments 4 replies
-
Hi! Really nice that you're looking at React v18 support for this package, I'm a log time user. I was looking at
The browser shows the following errors when hydrating:
Also, when using I made some simple benchmarks to compare with Results: NodeReact:NET React.NET What I'm trying to say: The speed and scalability of the current implementation with V8 seem to be a lot better if you still consider Javascript.NodeJS I would encourage some benchmarks just to make sure that numbers are not way off. Edit: |
Beta Was this translation helpful? Give feedback.
-
Hi! Thanks for getting back with a great response! =D I actually played for almost 10 hours this weekend to get to know how things work. I came to the understanding that the I got I know that NetLing is not state of the art in any way and I often use Benchmark.NET but in this case the differences are so clear that the point is still valid. I agree that the Node-interop approach is most likely the only sensible way to approach this even if that means a dependency on the hosting environment. I'm happy to help out in any way, maybe feedback, testing etc. Just let me know. Cheers! |
Beta Was this translation helpful? Give feedback.
-
Thanks for the update and ill definitely ping you about helping to test. Yeah It will be a bit before I can get to this (its in between my paid tasks) as I plan to do these upgrades the the project in order:
v18 will be a major breaking change and restructure a lot of this project im afraid. So, my plan there is to do a new branch there and more or less start from scratch while keeping the new API as compatible as possible with the old one so it can be an easy transition.. |
Beta Was this translation helpful? Give feedback.
-
I'm not sure I'm using most of the features of this library, but I did get some of my apps to play nice with React 18 Got around the missing TextEncoder/TextDecoder by adding the fastestsmallesttextencoderdecoder npm module to my server.jsx and referencing it as such:
Thought I'd throw that out there. This doesn't, of course, address the problem of the old .NET dependency. |
Beta Was this translation helpful? Give feedback.
-
I was thinking the same thing. In the early days of React, it was mostly JS-engine-agnostic and everything worked fine. These days it's using more Node.js feature and only Node and mostly-Node-compatible (Bun, Cloudflare workers, etc) engines work well with it. It's worth noting that Andrey added support for the JeringTech library to JavaScriptEngineSwitcher a few years ago, so it might be possible to prototype something using the JavaScriptEngineSwitcher infra that currently exists. It might be worth seeing if |
Beta Was this translation helpful? Give feedback.
-
IIRC the JSE added JeringTech but didnt have NodeStream support. See Taritsyn/JavaScriptEngineSwitcher#100 also ive been thinking more on this as well because seems like Reactis getting closer to Next.js. What i mean by this is that seems like some of the newer features are directly related/tied to Next.JS features/support. While other framework can still build there own it might be worth also exploring using JeringTech to spin up Next.JS. I believe its pretty customizeable and had the option/config to change the process name so something we can also look at. PS. sorry been a bit busy with some other paying gigs but still very high on my list :) |
Beta Was this translation helpful? Give feedback.
-
For v18, I think its going to be best to do a major breaking change here and move the React.Net.
Goal is to start a new branch doing something like Daniil started with NodeReact.NET. We would leverage Javascript.NodeJS for the interop work between NodeJS and .NET. The biggest concern right now is support for CSS-IN-JS which this project did with RenderFunctions. This has yet to be implemented in NodeReact.NET but i have a working POC for work to add this support as we heavily use MUI which depends on emotion at this time.
The reason I recommend basically merging the concepts from NodeReact.NET to this project is mainly due to the popularity of project and just make sense for a natural transition here.
This one will be a bigger discussion going forward as we look to better align with .NET 6+ and React v18+.
Please leave any thoughts, concerns etc...
Beta Was this translation helpful? Give feedback.
All reactions