Skip to content

Releases: reactjs/React.NET

5.2

19 Jun 04:44
a9d799b
Compare
Choose a tag to compare

🚀 We're pleased to announce the release of ReactJS.NET 5.2. In this release:

Templates

This update contains a brand new feature - templates! This feature makes it much easier to get started on a new project.

To start a new ASP.NET Core project using React and server-side rendering:

dotnet new -i React.Template
dotnet new reactnet-webpack
dotnet run

The reactnet-vanilla template is also available for projects that don't need webpack.

Webpack Asset Manifest Support

If you've ever wanted to use hashes in the filenames of generated assets, this feature is for you! When using Webpack and webpack-manifest-plugin, it's now possible to render the script and style tags automatically from the generated asset manifest. This can be especially helpful when using caching headers to instruct the client not to refetch these static assets from the server.

If using the filename pattern '[name].[contenthash:8].js', webpack will emit files that look like this:

vendor.8faee7f5.js
main-0c14766b.js

Configure reading these files server-side with config.SetReactAppBuildPath("~/dist"); where dist is the directory where webpack emits the built assets.

In your view code, call:

	@Html.ReactGetStylePaths() // in the doucment head next to other stylesheets

	@Html.ReactGetScriptPaths() // right before the body closing tag

Next, define an asset manifest format in your webpack config. Check out the sample webpack config for the format the asset manifest is expected to follow.

At render time, the asset manifest will be read from the dist directory and be mapped into script and style tags for the browser to download.

The reactnet-webpack sample uses this layout, so give it a try if you're curious!

Thanks

If this library has made a difference to you in either a work or personal project, I'd love to hear from you. We don't get paid at all to work on this, it's just for fun! Drop a line @dustinsoftware or @Daniel15

Cheers,
Dustin

5.1.2

25 Nov 05:05
Compare
Choose a tag to compare

🚀 We're pleased to announce the release of ReactJS.NET 5.1.2. A few small updates in this release:

  • .NET Core 3.0 support. The tutorial project has also been updated to demonstrate the (simple!) migration path.
  • React and ReactDOM updated to 16.12.0
  • Fix missing query parameter mapping for React.Router - thanks @mattywong

Please report any bugs in the issue tracker.

Cheers!

5.0.0

19 Jul 02:18
Compare
Choose a tag to compare

We're pleased to announce the release of ReactJS.NET 5.0.0. This release brings a few new features as well as a bunch of minor improvements:

  • Typescript compilation of .tsx components, which also updates to Babel 7 (#763)
  • Output caching improvements - (#858)
  • JSON.NET v12 support - (#779)
  • .NET Core 3 preview support - (#791)
  • Source link and symbol server support - (#830), ebb22ee
  • React and ReactDOM updated to 16.8.6

Thanks to the following developers for contributing to this release: @Daniel15, @dustinsoftware, @gunnim, @Taritsyn, @vanillajonathan

The release packages are available via NuGet.

Cheers!

4.1

23 Apr 04:48
Compare
Choose a tag to compare
4.1

Binaries available from NuGet directly 🚀

New to 4.1:

  • Updated bundled version of React to 16.8.4, which brings support for hooks
  • Updated babel to 6.26.3. We're working on enabling opt-in support for Babel 7 as well, but if you need this today, please use the webpack integration.
  • Updated the ASP.NET and .NET Core samples to demonstrate integrating third party libraries, such as Reactstrap.

New to 4.0:

  • Updated bundled version of React to 16.7 (you can always provide your own version of React if you need a newer version)
  • This library is now MIT licensed
  • Javascript engines are no longer automatically registered. See the getting started pages on .NET Framework and .NET Core for more information about how to register a specific Javascript engine in your app.
  • Support for faster Javascript engine initialization via the AllowJavaScriptPrecomplilation setting
  • Server side rendering support for
  • Lots of contributions from the community

We'd like to hear from you! If there are things you'd like to see added, please send feedback via Github Issues. We're a limited team and may not be able to implement what you'd like to see, but still want to hear how this project is being used and where it could be improved.

3.4

09 Jul 18:22
Compare
Choose a tag to compare
3.4

This is a minor release with a few performance-related changes contributed by Daniil Sokolyuk:

  • #529 - Cache whether component names are valid.
  • #528 - Fast React ID generator.
  • #532 - Avoid large object allocations and reuse everything.

A few other changes have also been included. Thanks to Dustin Masters for most of these changes:

  • #558 - Fix crashes related to loading React 16.4.1
  • #541 - Use ReactDOM.render rather than ReactDOM.hydrate for ClientOnly components. Thanks to Suhail Ansari for his first open-source contribution! :)
  • #537 - Added benchmarking tool for benchmarking changes to ReactJS.NET itself.

ReactJS.NET 4.0 beta has also been released. This release includes all the above changes, and also upgrades JavaScriptEngineSwitcher to 3.0.0 beta. Upgrade instructions can be found in the How to upgrade applications to version 3.X document.

3.3

05 Mar 03:16
Compare
Choose a tag to compare
3.3
  • #449 - Allow rendering HTML in an ASP.NET MVC web application outside of the context of a web request. Thanks to Bojan Čoka
  • #479 - Added example for ReactRouter. Thanks to Dustin Masters.
  • #473 - Added optional error boundary support. Thanks to Dustin Masters.
  • #496 - Added support for script nonce attributes. Thanks to Dustin Masters.
  • #497 - Several improvements to server-only rendering. Container elements are no longer rendered, and Html.RenderInitJavaScript no longer renders JS for these components. Thanks to Gustav Tonér
  • #438 - Simplified name of the HtmlHelper function for ReactRouter. Thanks to gunnim.
  • #514 - Replaced "path" with "location" for ReactRouter server-side rendering. Thanks to Chad Burggraf
  • #509 - Use NuGet reference rather than local reference for tutorial code. Thanks to Dustin Masters.
  • #475 - Fixed flaky unit tests.
    Thanks to Dustin Masters.

Huge thanks to Dustin Masters for reviewing several of the pull requests.

3.2

08 Nov 06:03
Compare
Choose a tag to compare
3.2

Along with a few small changes for people compiling ReactJS.NET itself:

  • #457 - Community, Enterprise, or Professional VS 2017 versions. Previously, it was only looking for the Community version. Thanks to Josh Goldberg.
  • #450 - Upgraded MSBuildTasks from 1.4.0.65 to 1.5.0.235 so that ReactJS.NET can be built on systems that don't have .NET Framework 3.5 installed.
  • #442 - Explicitly exclude node_modules from build to avoid a long-standing MSBuild bug.

3.1

02 Jul 23:56
Compare
Choose a tag to compare
3.1
  • #388 - ASP.NET Core middleware is now in a separate NuGet package. If you want to use the middleware to transpile JavaScript without pulling in the full ASP.NET MVC Core framework, you can just use the React.AspNet.Middleware NuGet package.
  • #421 - Upgraded to JSPool 3.0. This has a few small API changes, but should not affect most sites unless you're messing with the internals of ReactJS.NET.
  • #421 - The MSBuild task now has an assembly binding for JavaScriptEngineSwitcher.Core, which should prevent strange errors when the version of JavaScriptEngineSwitcher.V8 does not match the version of JavaScriptEngineSwitcher.Core.
  • #413 - The DefaultEngineName setting in JavaScriptEngineSwitcher is now respected, and can be used to force a particular engine to be used.
  • #416 - MaxUsagesPerEngine is now available as a configuration option. Thanks to Halstatt.
  • #419 - Server-side console calls (eg. console.log) now include the stack trace. Thanks to Halstatt.

The ReactJS.NET project has also been upgraded to use the Visual Studio 2017 tooling (#406). This means that if you want to modify ReactJS.NET itself, you need to be using Visual Studio 2017.

3.0.1

02 Jul 23:44
Compare
Choose a tag to compare
  • #359 - Fixed issue with relativePath being duplicated
  • #354 - Fixed issue with registering React assemblies with TinyIoC in some instances

3.0

10 Oct 02:40
79801ba
Compare
Choose a tag to compare
3.0

Major Changes:

  • Support for ASP.NET MVC 3 was removed. MVC 4 was released in 2012, so I hope everyone has upgraded by now :)
  • #294 - Added support for .NET Core
  • #306 - Upgraded to JavaScriptEngineSwitcher 2.0
  • #330 - Use camelcase for JSON by default. This corresponds with a breaking change made in the final release of ASP.NET Core 1.0. If you were relying on the legacy behaviour, you can use SetJsonSerializerSettings in your ReactJS.NET config to revert back to the old behaviour.

Other tweaks:

  • #323 - Upgraded to React 15.3.2
  • #331 - Added option to totally disable server-side rendering. This is useful when debugging your React components, as it's easier to debug client-side
  • #316 - Added option to use production version of React, and enabled it by default. You can call SetUseDebugReact(true) in your ReactJS.NET config to use the debug version. The production version of React is much faster than the debug build, but it has less useful error messages if something does go wrong.
  • #299 - Use file hash to check for file changes before transpiling. Thanks to Torben Rahbek Koch
  • #317 - Switched to Paul Knopf's branch of VroomJs (V8 for Linux / Mac OS) rather than maintaining our own fork