Wow yeah i see your bulleted list of concerns and was thinking about #3 too...
I haven't given it much thought and it now seems like a hairy scheme but i was thinking that it's possible to have the first page as an "SPA container" app that is rendered server side by Express/Jade like any NodeJS server rendered page (without React/Reagent) and is literally just one page for the "/" route, which then launches the Reagent SPA once the container app needs to navigate to another route (anything beyond "/") after storing its last state on the server. I haven't thought it through but the idea was to essentially make the first page its own light weight server rendered app (no react + reagent) and have it pass state/control to a child app (the Reagent SPA) that it would load in the browser context. Sent from my iPhone > On May 19, 2015, at 8:58 AM, Matt Ho <[email protected]> wrote: > > For this particular project, I need the content to be rendered server side > for SEO purposes. > > I'm not sure I follow what you mean by having express render the page. > Duplicate what reagent is doing in express? I'm hoping to avoid that. I > thought about pre-rendering the page and having express show that, but that > feels wrong. > > @matthew I have a couple of things I was hoping to improve with it. > > 1. Having to download react.js again seems wrong. Seems like I should be > able to pick up my local version of it. > > 2. While a global reagent atom works on the client side where's there only > one user, it doesn't really work on the server side where multiple requests > can be happening in parallel. I cleaned up this one already by putting the > atom inside a per request closure > > 3. Express has routing and Secretary has routing. Seems like I should just > be able to use one router rather than two. > > -- > Note that posts from new members are moderated - please be patient with your > first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/clojurescript. -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
