Member-only story
ReactJS.Net
A library for Serverside-rendered React, with data from a .NET Core backend.
As a developer who started learning to code with javascript, I have a soft spot for SPAs, interesting UI frameworks, and overcomplicating things 😅. As I’ve worked on larger projects across different areas of the tech stack, I’ve come to appreciate the simplicity of the classic application stack — a backend-heavy, serverside-rendered, .NET or PHP application.
For a few years there has been a disconnect between those two application styles, with new javascript developers coming into the game thinking that SPAs are the only way to write an application and old hands thinking that SSR is the only way to go. I also find that React is especially suitable for serverside rendering as compared to many other frontend frameworks, but that’s a story for another time.
One of my favorite tech stacks for working with SSR is .NET and React, and my tool of choice for adding react SSR to a react application is Reactjs.net.
\What is this tool? Essentially, Reactjs.net is a set of nuget packages that extend your .NET MVC or .NET Core application to give it access to React rendering helper methods.
The main methods are as follows:
- @Html.React() — The primary SSR method. It is a lot like the…