ReactJS.NET 5.2

June 12, 2020 by Dustin Masters


🚀 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

ReactJS.NET 5.1.2

November 24, 2019 by Dustin Masters


🚀 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!

ReactJS.NET 5.0.0

July 16, 2019 by Dustin Masters


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

Cheers!

ReactJS.NET 4.1.1

March 14, 2019 by Dustin Masters


We're pleased to announce that ReactJS.NET 4.1.1 is now available for download.

  • 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.

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.

Cheers!

ReactJS.NET 4.0

January 16, 2019 by Dustin Masters


It's been under development for a while now, but ReactJS.NET 4.0 is finally released! 🎉🎈

This release brings a few new features:

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.

Cheers!