Skip to content

Releases: DaniilSokolyuk/NodeReact.NET

2.0.0

14 Feb 15:21
0655461
Compare
Choose a tag to compare
  • Added support for React 18 only.
  • Using ReactDOM.hydrateRoot(domNode, creactNode) and ReactDOM.createRoot(domNode).render(reactNode) instead ReactDOM.render and ReactDOM.hydrate
  • Removed eval from server-side operations.
  • Switched to using System.Text.Json for React props serialization by default, with the option to switch to Newtonsoft.Json by calling the ConfigureNewtonsoftJsonPropsSerializer method
  • Replaced the workerpool npm package with the multi-node.js mode in the Jering.Javascript.NodeJS library.
  • Updated to the latest npm and nuget packages.
  • Removed the ReactWithInitAsync function in favor of using the bootstrapInPlace and bootstrapScriptContentProvider options in tag helpers.
  • Added the bootstrapInPlace setting in tag helpers for manual component hydration or calling ReactInitJavaScript.
  • Removed the StartEngines, MaxEngines, and MaxUsagesPerEngine settings
  • Optimized performance by returning plain/text to avoid serialization/deserialization issues
  • Added the EnginesCount and FileWatcherDebounceMs settings
  • Switched to using renderToPipeableStream instead of renderToString on the server for better performance
  • Replaced serialization and deserialization with Microsoft.IO.RecyclableMemoryStream for output HTML and props.
  • Introduced a custom ASP.NET Core view engine that can stream the entire page directly from node to the client using renderToPipeableStream. This provides better performance (up to 50%) and support for Suspense