Skip to content

Commit

Permalink
Fixed to to match current setup instructions (#397)
Browse files Browse the repository at this point in the history
According to
https://reactjs.net/getting-started/tutorial.html
you run services.AddReact() not app.AddReact()
  • Loading branch information
gunnim authored and Daniel15 committed Apr 24, 2017
1 parent eddde8a commit 1206a7d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/React.AspNet/HtmlHelperExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private static IReactEnvironment Environment
"ReactJS.NET has not been initialised correctly.",
#else
"ReactJS.NET has not been initialised correctly. Please ensure you have " +
"called app.AddReact() and app.UseReact() in your Startup.cs file.",
"called services.AddReact() and app.UseReact() in your Startup.cs file.",
#endif
ex
);
Expand Down
2 changes: 1 addition & 1 deletion src/React.AspNet/HttpContextLifetimeProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private PerRequestRegistrations Registrations
{
throw new ReactNotInitialisedException(
"ReactJS.NET has not been initialised correctly. Please ensure you have " +
"called app.AddReact() and app.UseReact() in your Startup.cs file."
"called services.AddReact() and app.UseReact() in your Startup.cs file."
);
}
return registrations;
Expand Down
2 changes: 1 addition & 1 deletion src/React.AspNet/ReactBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private static void EnsureServicesRegistered(IApplicationBuilder app)
var registrations = app.ApplicationServices.GetService<HttpContextLifetimeProvider.PerRequestRegistrations>();
if (registrations == null)
{
throw new ReactNotInitialisedException("Please call app.AddReact() before app.UseReact().");
throw new ReactNotInitialisedException("Please call services.AddReact() before app.UseReact().");
}
}

Expand Down

0 comments on commit 1206a7d

Please sign in to comment.