Hello world
appropo, is there any take on server side rendering with carry? 🙂 Maybe along the lines of instructions/hints on how to form and load initial state of the app
Hi Kimmo 🙂
To answer your question, not that I know of. I was in the process of adopting bidi a few weeks ago, but I haven't worked on my project for a while because of things.
but if you don't care about URL navigation, then loading the initial state is super easy, right? If you do care, then you can just use the same routes on the client and the server, which bidi allows you to do
Hi @viesti! There's no guide on using Carry with server-side rendering yet. I guess it shouldn't be much different from what you'd do using any other [React-based/Flux-like] stack, e.g. Redux: http://redux.js.org/docs/recipes/ServerRendering.html The biggest hurdle will probably be the rendering part itself. Here's a recipe for Reagent: https://github.com/reagent-project/reagent-cookbook/tree/master/recipes/reagent-server-rendering and also a related issue https://github.com/reagent-project/reagent/issues/247. So you could also consider replacing Reagent with Rum which has a better support for server-side rendering.
carry-rum might be neat
https://github.com/Kauko/predictor/blob/master/src/cljc/predictor/carry_rum.cljc
Another thing I was wondering about is the recent addition of coeffects/effects to re-frame (https://github.com/Day8/re-frame/wiki/Effectful-Event-Handlersand) how they compare to the control function of carry