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
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,3 +72,26 @@ meaning your initial render will be super fast.
72
72
73
73
For a more in-depth example, take a look at the included sample application
74
74
(**React.Samples.Mvc4**).
75
+
76
+
5 - How not to render the React data attributes
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.
79
+
80
+
```csharp
81
+
@Html.React("HelloWorld", new
82
+
{
83
+
name="Daniel",
84
+
renderReactAttributes:false
85
+
})
86
+
```
87
+
88
+
And the Html markup will look like which is a lot cleaner. In this case there is no need to laod the React script or call the `Html.ReactInitJavaScript()` method.
0 commit comments