Skip to content

Releases: reactjs/React.NET

1.5.4

18 Oct 01:15
Compare
Choose a tag to compare
  • Update ASP.NET 5 to Beta 6

1.5.3

18 Oct 01:15
Compare
Choose a tag to compare
  • Switch the order of server and client-side console.log calls
  • Add option not to render the React data-attributes during server side rendering

1.5.2

31 May 05:10
Compare
Choose a tag to compare

Updated ASP.NET 5 support to support ASP.NET 5 Beta 4.

1.5.1

24 Apr 05:02
Compare
Choose a tag to compare

This is a bug fix release and fixes a potential XSS issue with server-side rendering. JSON.NET does not escape HTML characters in its JSON output by default. As ReactJS.NET uses JSON.NET to output the props of server-side rendered components, a prop that accepts arbitrary user input could potentially contain script tags, allowing for XSS.

Escaping of HTML is now enabled by default. If you are using custom JSON serializer settings, you can enable HTML escaping by setting StringEscapeHandling to StringEscapeHandling.EscapeHtml:

ReactSiteConfiguration.Configuration.SetJsonSerializerSettings(
  new JsonSerializerSettings
  {
    StringEscapeHandling = StringEscapeHandling.EscapeHtml
  }
);

Have fun, and as always, please feel free to send feedback or bug reports
on GitHub.

— Daniel

Thanks to Li Huan Jeow for the report.

1.5

14 Apr 05:00
Compare
Choose a tag to compare
1.5
  • #93 - Upgraded React to 0.13.1. See the full changelog on the React site.
  • #91 - Method to load a script without transforming it. It's becoming more and more common to use external build systems (Gulp, Grunt) or bundlers (Webpack, Browserify) that handle the JSX transformation. The output of these can be loaded directly into ReactJS.NET as it's just vanilla JavaScript. AddScriptWithoutTransform makes loading these files more efficient by just loading them directly.
  • New option to disable the MSIE JavaScript engine and force use of the V8 engine. If V8 can't be initialised for whatever reason, an exception is thrown.
  • #103 - Flag for RenderHtml to skip server-side rendering and only render the client-side JavaScript. Useful for debugging the JavaScript in a browser. Thanks Justin Slattery.
  • #60 - Scripts can now be loaded using wildcard patterns: .AddScript("~/Content/*.js").
  • #113 - Ability to provide your own React version rather than using the bundled version.
  • #104 - Correctly handle exceptions in ExecuteWithLargerStackIfRequired, and upgrade to latest Newtonsoft.Json to fix issue with MSBuild.
  • Upgraded to JSPool 0.3 for better handling of recycling the JavaScript engines when a file changes.
  • Created missing React.Owin NuGet package.

1.4

03 Mar 06:27
Compare
Choose a tag to compare
1.4

This release adds support for the beta version of ASP.NET 5, better handling of server-side console.log calls, and the V8 JavaScript engine is now included as standard (the MSIE engine is still available for use, though).

Full list of changes:

  • #47 and #94Support for ASP.NET 5. You must be using Visual Studio 2015 CTP6 and ASP.NET 5 Beta 3. Documentation will be added to the site shortly.
  • #86console calls such as console.log during server-side rendering will automatically be propagated to the client-side. This can greatly assist in debugging server-side rendering. Nicer debugging tools will come in the future!
  • #96 — Bundle V8 support by default, stop relying on MSIE engine as much.
  • #97 — Upgrade to JSPool 0.2. This improves the handling of JavaScript engines by recycling them after a number of uses, which ensures memory usage doesn't keep growing over time.
  • #89 — Fixed "Object doesn't support property or method 'defineProperty'" with MSIE engine when using Flow types.
  • #69 — Support for OWIN. Thanks to Marcin Drobik.
  • #70 — JsxTransformer exceptions now include whole inner exception. Thanks to Marcin Drobik.
  • #84 — Fixed missing strong name on System.Web.Optimization.React and React.MSBuild.
  • #67 — ReactJS.NET website now has a fancy logo. Thanks Rick Beerendonk!

1.3

26 Feb 05:47
Compare
Choose a tag to compare
1.3

This release significantly improves the performance of server-side rendering by pooling and reusing JavaScript engines rather than creating a new one on every request. Pooling of JavaScript engines is turned on by default but it can be disabled in your site's configuration (usually ReactConfig.cs) to revert back to the classic behaviour. This is still experimental, so please let me know if it works well for you!

This release also adds support for stripping out Flow type annotations from your code. Flow is a new open-source static type checker for JavaScript, recently released by Facebook. It adds static typing to JavaScript to improve developer productivity and code quality. You can learn more about Flow in its release announcement. Support for Flow is disabled by default but can be enabled in your site's configuration.

Other changes:

  • Harmony (ES6) transformations are enabled by default. They can be disabled in your site's configuration.
  • The Cassette integration now transforms all files in the bundle, not just *.jsx files. (#52)

1.2

26 Feb 05:48
Compare
Choose a tag to compare
1.2
  • Basic source map support. Source maps will now be available when accessing .jsx files directly. It's not supported for combined/minified files at the moment since none of the common .NET minifiers support source maps. (#8)
  • React version upgraded from 0.12.0 to 0.12.1.

Server-side rendering:

  • The HTML tag used as the component's container can now be changed. Previously it was hardcoded to be a div. (#45)
  • The ID of the container element can now be changed. Previously it was always an auto-generated ID in the format "react1", "react2", etc. (#50)
  • New Html.ReactWithInit helper method to render both the HTML component and its client-side JavaScript initialisation script. This is useful when rendering self-contained partial views containing React components. Thanks to BartAdv. (#42)

Under the hood:

  • Allow custom JsonSerializerSettings to be provided. *Thanks to BartAdv. (#43)
  • Switch various methods from private to protected virtual so they can be overridden. (#39)
  • Use newer React factory syntax for instantiating components. (#46)

1.1.3

26 Feb 05:49
Compare
Choose a tag to compare

In this release, the React version has been upgraded from 0.11.1 to 0.12. The main changes in this React release are that /** @jsx React.DOM */ is no longer required at the top of your JSX files, and React.renderComponent is now React.render. A few other API methods have changed as well. See the official announcement for more information on all the changes in this version of React.

ReactJS.NET 1.1.3 also adds preliminary support for using Google's V8 JavaScript engine on Windows, via Microsoft's ClearScript project. Previously ReactJS.NET only supported V8 on Mac OS X and Linux. This should be considered beta quality, in that it works but has not been stress tested in a production environment yet (whereas the Linux implementation has been). Future releases will make the handling of JavaScript engines more efficient.

1.1.2

26 Feb 05:49
Compare
Choose a tag to compare
  • Error messages now contain more details, including file name, component name, line number and column number. This should make debugging a bit easier, especially if you're debugging without Visual Studio attached. (#17)
  • JSX Namespacing is now supported (#37)