diff --git a/templates/ReactSpa/ClientApp/boot-server.tsx b/templates/ReactSpa/ClientApp/boot-server.tsx
deleted file mode 100644
index b433f2e..0000000
--- a/templates/ReactSpa/ClientApp/boot-server.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import * as React from 'react';
-import { renderToString } from 'react-dom/server';
-import { match, RouterContext } from 'react-router';
-import createMemoryHistory from 'history/lib/createMemoryHistory';
-import { routes } from './routes';
-
-// The 'asp-prerender-module' tag helper invokes the following function when the React app is to
-// be prerendered on the server. It runs asynchronously, and issues a callback with the React app's
-// initial HTML and any other state variables.
-
-export default function (params: any): Promise<{ html: string }> {
- return new Promise<{ html: string, globals: { [key: string]: any } }>((resolve, reject) => {
- // Match the incoming request against the list of client-side routes, and reject if there was no match
- match({ routes, location: params.location }, (error, redirectLocation, renderProps: any) => {
- if (error) {
- throw error;
- }
-
- // Build an instance of the application and perform an initial render.
- // This will cause any async tasks (e.g., data access) to begin.
- const history = createMemoryHistory(params.url);
- const app = ;
- renderToString(app);
-
- // Once the tasks are done, we can perform the final render
- params.domainTasks.then(() => {
- resolve({
- html: renderToString(app),
- globals: { /* Supply any other JSON-serializable data you want to make available on the client */ }
- });
- }, reject); // Also propagate any errors back into the host application
- });
- });
-}
diff --git a/templates/ReactSpa/ClientApp/boot-client.tsx b/templates/ReactSpa/ClientApp/boot.tsx
similarity index 100%
rename from templates/ReactSpa/ClientApp/boot-client.tsx
rename to templates/ReactSpa/ClientApp/boot.tsx
diff --git a/templates/ReactSpa/ClientApp/components/About.tsx b/templates/ReactSpa/ClientApp/components/About.tsx
deleted file mode 100644
index a178eaf..0000000
--- a/templates/ReactSpa/ClientApp/components/About.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-import * as React from 'react';
-
-export class About extends React.Component {
- public render() {
- return
This component demonstrates fetching data from the server.
+ { contents }
+
For more sophisticated applications, consider an architecture such as Redux or Flux for managing state. You can generate an ASP.NET Core application with React and Redux using dotnet new aspnet/spa/reactredux instead of using this template.
Client-side navigation. For example, click About then Back to return here.
-
Server-side prerendering. For optimal performance, your React application is first executed on the server. The resulting HTML and state is then transferred to the client to continue execution. This is also known as being an isomorphic or universal application.
+
Client-side navigation. For example, click Counter then Back to return here.
Webpack dev middleware. In development mode, there's no need to run the webpack build tool. Your client-side resources are dynamically built on demand. Updates are available as soon as you modify any file.
Hot module replacement. In development mode, you don't even need to reload the page after making most changes. Within seconds of saving changes to files, rebuilt CSS and React components will be injected directly into your running application, preserving its live state.
Efficient production builds. In production mode, development-time features are disabled, and the webpack build tool produces minified static CSS and JavaScript files.
+
Going further
+
+ For larger applications, or for server-side prerendering (i.e., for isomorphic or universal applications), you should consider using a Flux/Redux-like architecture.
+ You can generate an ASP.NET Core application with React and Redux using dotnet new aspnet/spa/reactredux instead of using this template.
+