From c9d235d4253052dc3d7f8f55c03279fe2c2a4adc Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Wed, 17 May 2017 22:06:32 +0100 Subject: [PATCH] Update ReactSpa to latest versions of dependencies, and pin to exact versions. Simplify some instructions. --- .../ClientApp/components/FetchData.tsx | 1 - .../ReactSpa/ClientApp/components/Home.tsx | 2 +- templates/ReactSpa/package.json | 46 +++++++++---------- 3 files changed, 24 insertions(+), 25 deletions(-) diff --git a/templates/ReactSpa/ClientApp/components/FetchData.tsx b/templates/ReactSpa/ClientApp/components/FetchData.tsx index 9fe5eb1..6474f01 100644 --- a/templates/ReactSpa/ClientApp/components/FetchData.tsx +++ b/templates/ReactSpa/ClientApp/components/FetchData.tsx @@ -27,7 +27,6 @@ export class FetchData extends React.Component<{}, FetchDataExampleState> {

Weather forecast

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.

; } diff --git a/templates/ReactSpa/ClientApp/components/Home.tsx b/templates/ReactSpa/ClientApp/components/Home.tsx index 3c092a5..76d8d04 100644 --- a/templates/ReactSpa/ClientApp/components/Home.tsx +++ b/templates/ReactSpa/ClientApp/components/Home.tsx @@ -21,7 +21,7 @@ export class Home extends React.Component<{}, {}> {

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. + You can generate an ASP.NET Core application with React and Redux using dotnet new reactredux instead of using this template.

; } diff --git a/templates/ReactSpa/package.json b/templates/ReactSpa/package.json index c38c79d..65f2f4d 100644 --- a/templates/ReactSpa/package.json +++ b/templates/ReactSpa/package.json @@ -2,30 +2,30 @@ "name": "WebApplicationBasic", "version": "0.0.0", "devDependencies": { - "@types/history": "^2.0.39", - "@types/react": "^0.14.38", - "@types/react-dom": "^0.14.17", - "@types/react-router": "^2.0.38", - "@types/webpack-env": "^1.13.0", - "aspnet-webpack": "^1.0.27", + "@types/history": "4.5.1", + "@types/react": "15.0.24", + "@types/react-dom": "15.5.0", + "@types/react-router": "4.0.9", + "@types/webpack-env": "1.13.0", + "aspnet-webpack": "^1.0.29", "aspnet-webpack-react": "^2.0.0", - "awesome-typescript-loader": "^3.0.0", - "bootstrap": "^3.3.6", - "css-loader": "^0.25.0", - "event-source-polyfill": "^0.0.7", - "extract-text-webpack-plugin": "^2.0.0-rc", - "file-loader": "^0.9.0", - "isomorphic-fetch": "^2.2.1", - "jquery": "^2.2.1", - "json-loader": "^0.5.4", - "react": "~15.4.0", - "react-dom": "~15.4.0", + "awesome-typescript-loader": "3.1.3", + "bootstrap": "3.3.7", + "css-loader": "0.28.1", + "event-source-polyfill": "0.0.9", + "extract-text-webpack-plugin": "2.1.0", + "file-loader": "0.11.1", + "isomorphic-fetch": "2.2.1", + "jquery": "3.2.1", + "json-loader": "0.5.4", + "react": "15.5.4", + "react-dom": "15.5.4", "react-hot-loader": "3.0.0-beta.7", - "react-router-dom": "^4.0.0", - "style-loader": "^0.13.1", - "typescript": "^2.2.1", - "url-loader": "^0.5.7", - "webpack": "^2.2.0", - "webpack-hot-middleware": "^2.12.2" + "react-router-dom": "4.1.1", + "style-loader": "0.17.0", + "typescript": "2.3.2", + "url-loader": "0.5.8", + "webpack": "2.5.1", + "webpack-hot-middleware": "2.18.0" } }