SSR in Meteor - some thoughts

I think new server-render package is really nice, here are some of my thoughts and real code examples regarding server side rendering in Meteor. I hope it’ll be useful somehow:


I’ve been meaning to try this. Looking forward to checking out the post, thanks!

Hi there, any reason why to use redux against Viewmodel ?

Just sticking to the react environment and ways of doing things. No big philosophy here. Just the matter of your choice.

Just saw this question.

I’m not sure what you meant by “against”. If it’s “with” then Redux isn’t needed with VM. If it’s “instead of” then they have different purposes, Redux is just state management while VM is more framework-ish and has state management capabilities built in.

I was thinking about that and cannot stop thinking state management in ViewModel is done in an easy way for development experience.

That being said everyone is running for the ‘time travel’ capabilities. I also see that react-redux-router is a nice way of routing.

What I believe is that Viewmodel would be better if it was able to handle routing (and SSRouting) seamlessly, with time travel being an automatic feature for debugging and why not propose an easy API for integrating undo-redo features on the fly.

The other thing is that developers want decoupling so much, it would be easier to separate the state management in a separate package (and routing in another one)
But I have to say Viewmodel is great because it has so much out of the box.

PS: how can I contact you to discuss without spamming this forum?

As with Meteor the magic is in the glue, not the parts. If you extract the dependency mechanism you’d end up with a light version of RxJS.

As for time travel, it’s supported by VM but I haven’t created the tools for it. I’ve done demos with a slider on top of the app which let’s you go back and forth in "time *. You can see some of this in the ViewModel Explorer component. It lets you save and reload the entire state of your app.

Even people in the Elm camp will tell you time travel is great for demos (huge wow factor) but not that useful on a day to day basis. Maybe once in a blue moon when you’re debugging a hard problem.

Btw, you can PM if you want.

I use redux because it’s the biggest ecosystem, most packages, most tutorials, most blogs, most info, most tested. Plus, once you get the hang of it, you’re just as fast with hit as anything else. A lot of time for me the most important thing is “if I run into a question, how likely am I to find a solid answer quickly”. With redux, you’re nearly 100% somebody has solved whatever redux state specific issue you are running into.