-
Notifications
You must be signed in to change notification settings - Fork 925
Server-Side Rendering without MVC #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What server-side technology are you using? Are you using WebForms, ServiceStack, or something totally different? Html.React is a pretty small wrapper around You can do the same thing yourself without using MVC by using the var environment = React.AssemblyRegistration.Container.Resolve<IReactEnvironment>();
var component = environment.CreateComponent(componentName, props);
return component.RenderHtml(); And use Whichever technology you're using should be able to have a nice wrapper around this. |
Great! |
@Daniel15 Is this answer still relevant today? I'm looking to use ReactJS.NET with WebForms. But I've noticed the HtmlHelperExtensions.cs file is no longer in the repo. I'm new to .NET so I'm not sure what this means. Could you follow up? Thank you! |
Still relevant, although you should use
|
@Daniel15 Thanks! I'll give that a try. |
I'm having an issue that I think is similar to this. Using the ReactEnvironment.Current seemed to work, but now I get This is with a fresh webforms project (I'm also new to asp.)
I'm not sure what else I need to do. Thoughts? If I navigate to |
@gin93r If the code you posted is matches your setup, then you forgot to add Out of scope comment, if you're going to build your whole UI with React, I strongly recommend using Webpack. |
@fgaleano Thanks. I did forget to put that in, however, doing so has not changed the outcome. I'm still getting the missing component exception. |
Ok I figured it out. It's because I created a Website using Web Forms and not a Web Application using Web Forms. |
@gin93r Interesting. I'm new to .NET so I'm not sure what are the differences between the 2. Something to keep in mind if I ever do another one of this. Thanks for the update! |
Hi i'm trying to use React SSR with Kentico (CMS based on Web Forms) and receive an error
here is my code /CMSScripts/Custom/components/helloWorld.jsx
react web part
\App_Start\ReactConfig.cs
What is wrong with my code? Why it doesn't work? |
Please add support for Server-Side Rendering without MVC.
Right now Html.React is dependant on MVC.
Thank you
The text was updated successfully, but these errors were encountered: