jeudi 12 février 2015

Is it possible to server-side render jQuery with ReactJS.Net?


I've been going through this tutorial on ReactJS.NET, and hit a snag. It mentions that:



We will use simple polling here but you could easily use SignalR or other technologies.



While this works when I do client-side rendering, it throws the following error when rendering server-side. Currently, I don't actually need jQuery or SignalR to render the initial state as I'm only using them to subscribe to updates once the app is running. I guess my question is, what is the correct way to structure my React application so that I can render it server-side or client-side at will.


An exception of type 'React.Exceptions.ReactScriptLoadException' occurred in React.dll but was not handled in user code


Error while loading "~/Scripts/jquery-1.10.2.js": ReferenceError: window is not defined





Aucun commentaire:

Enregistrer un commentaire