I did the comments tutorial on http://reactjs.net/getting-started/tutorial.html and got it to render server side using .net mvc.
I have an existing mvc app where I rewrote a page in react. I'm trying to render it server side but get this message:
"'System.Web.Mvc.HtmlHelper>' does not contain a definition for 'React' and no extension method 'React' " - the error refers to the "@Html.React" code in my view.
@Html.React("TopicAnswers", new
{
initialAnswers = Model,
url = Url.Action("TopicAnswers", new { id = ViewBag.TopicID }),
})
I have the same files downloaded from Nuget as the tutorial. I tried this at the top of my view to no avail:
@using React;
In my ReactConfig.cs file, I see a "using React;" at the top and in the code, this is fine:
ReactSiteConfiguration.Configuration
.AddScript("~/Scripts/internal/eusVote/TopicAnswers.jsx");
One more thing. My view is in /Areas/Subfolder/Views
Why does my code complain about @Html.React in my view?
Viewsfolder