Skip to content

Commit 98f75f1

Browse files
vanillajonathandustinsoftware
authored andcommitted
Documentation fixes and improvements (#812)
* Use function component instead of class component * Refer to React.NET For ASP.NET Core * Refer to OS X as macOS * ASP.NET Core uses diff path than old ASP.NET * Use ASP.NET Core js path
1 parent 4931d14 commit 98f75f1

File tree

5 files changed

+14
-18
lines changed

5 files changed

+14
-18
lines changed

site/jekyll/getting-started/aspnetcore.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ app.UseReact(config =>
5656
// your components as well as all of their dependencies.
5757
// See http://reactjs.net/ for more information. Example:
5858
//config
59-
// .AddScript("~/Scripts/First.jsx")
60-
// .AddScript("~/Scripts/Second.jsx");
59+
// .AddScript("~/js/First.jsx")
60+
// .AddScript("~/js/Second.jsx");
6161
6262
// If you use an external build too (for example, Babel, Webpack,
6363
// Browserify or Gulp), you can improve performance by disabling
@@ -87,6 +87,6 @@ You're done! You can now call `Html.React` from within Razor files:
8787
@Html.React("Sample", new { initialComments = Model.Comments, page = Model.Page })
8888
```
8989

90-
If you need support for non-Windows platforms, please see the [OS X/Linux guide](/getting-started/chakracore.html)
90+
If you need support for non-Windows platforms, please see the [Linux/macOS guide](/getting-started/chakracore.html)
9191

9292
Check out the [sample project](https://github.com/reactjs/React.NET/tree/master/src/React.Sample.Webpack.CoreMvc) for a working demo.

site/jekyll/getting-started/chakracore.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
layout: docs
3-
title: OS X/Linux
3+
title: macOS/Linux
44
---
5-
6-
ReactJS.NET supports running on non-Windows platforms via both Mono and .NET Core. This guide focuses on OS X / Linux support via the ChakraCore engine and .NET Core, which uses precompiled binaries. To use the full .NET framework with Mono, please see the [Mono guide](/guides/mono.html).
5+
1
6+
ReactJS.NET supports running on non-Windows platforms via both Mono and .NET Core. This guide focuses on Linux / macOS support via the ChakraCore engine and .NET Core, which uses precompiled binaries. To use the full .NET Framework with Mono, please see the [Mono guide](/guides/mono.html).
77

88
Add `React.AspNet` as a dependency to your .NET Core project. Check out the [sample project](https://github.com/reactjs/React.NET/tree/master/src/React.Sample.Webpack.CoreMvc) or the [documentation](https://reactjs.net/getting-started/aspnetcore.html) if you need more details on that.
99

site/jekyll/getting-started/download.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ These packages can be installed either via the
2323
or via the Package Manager Console:
2424

2525
```
26-
Install-Package React.Web.Mvc4
26+
Install-Package React.AspNet
2727
```
2828

2929
## Development Builds

site/jekyll/getting-started/usage.md

+4-8
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,12 @@ Once installed, create your React components as usual.
77

88
```javascript
99
// /Scripts/HelloWorld.jsx
10-
class HelloWorld extends React.Component {
11-
render() {
12-
return (
13-
<div>Hello {this.props.name}</div>
14-
);
15-
}
16-
}
10+
const HelloWorld = (props) => {
11+
return (<div>Hello {props.name}</div>);
12+
};
1713
```
1814

19-
On-the-Fly JSX to JavaScript Compilation
15+
On-the-fly JSX to JavaScript Compilation
2016
----------------------------------------
2117
Hit a JSX file in your browser (eg. `/Scripts/HelloWorld.jsx`) and observe
2218
the magnificence of JSX being compiled into JavaScript with no precompilation

site/jekyll/tutorials/aspnetcore.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,16 @@ app.UseReact(config =>
106106
// your components as well as all of their dependencies.
107107
// See http://reactjs.net/ for more information. Example:
108108
//config
109-
// .AddScript("~/Scripts/First.jsx")
110-
// .AddScript("~/Scripts/Second.jsx");
109+
// .AddScript("~/js/First.jsx")
110+
// .AddScript("~/js/Second.jsx");
111111
112112
// If you use an external build too (for example, Babel, Webpack,
113113
// Browserify or Gulp), you can improve performance by disabling
114114
// ReactJS.NET's version of Babel and loading the pre-transpiled
115115
// scripts. Example:
116116
//config
117117
// .SetLoadBabel(false)
118-
// .AddScriptWithoutTransform("~/Scripts/bundle.server.js");
118+
// .AddScriptWithoutTransform("~/js/bundle.server.js");
119119
});
120120
```
121121

0 commit comments

Comments
 (0)