You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/jekyll/guides/server-side-rendering.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,16 +73,16 @@ meaning your initial render will be super fast.
73
73
For a more in-depth example, take a look at the included sample application
74
74
(**React.Samples.Mvc4**).
75
75
76
-
5 - How not to render the React data attributes
76
+
5 - Server-side only rendering
77
77
78
-
If thre is no need to have a React application client side and you just want to use the server side rendering but without the React specific data attributes call `Html.React` and pass renderReactAttributes parameter as false.
78
+
If there is no need to have a React application client side and you just want to use the server side rendering but without the React specific data attributes call `Html.React` and pass serverOnly parameter as true.
79
79
80
80
```csharp
81
81
@Html.React("HelloWorld", new
82
82
{
83
-
name="Daniel",
84
-
renderReactAttributes:false
85
-
})
83
+
name="Daniel"
84
+
}
85
+
serverOnly:true)
86
86
```
87
87
88
88
And the Html mark up will look like the one following which is a lot cleaner. In this case there is no need to load the React script or call the `Html.ReactInitJavaScript()` method.
0 commit comments