Image for post
Image for post

A few days ago, while talking with a friend about a new project his team is about to start, he asked me my opinion about which JavaScript framework to use.

Of course, there is no right or wrong answer to this. However, the human psyche is always hungry for debates and conflicts, and this is why the internet is full of articles and texts that either try to prove framework A’s superiority, or rant against using framework B. Of course, the available options are more than two.

The truth is that all frameworks (at least the major and most known) have something valuable to offer, and thus it all boils down to pros and cons, and how these in particular affect your team, your project, and your product both in the short and the long run. …

Last week I published a story about store creation in @WalmartLabsElectrode. As I said, apart from that first engineering question, I had another one, this time regarding Server Side Rendering and store initialization when data prefetching is needed.

The problem

Let’s suppose we have the following case: Our application initializes a certain page by making an XHR to our server, retrieving the data to show (true SPA style). In order to Server Side Render this page, though, we need to have that data available beforehand. The real question behind all this is the following:

How can we initialize our store with such data, while enforcing code reuse as much as we can, and then feed those components+data to be Server Side Rendered? Keep in mind, that while this issue can be solved without much fuss when designing an application from scratch, I couldn’t find a clean way to do it in an Electrode app. …

The past few days I’ve been experimenting with @WalmartLabsElectrode. It seems like a rather interesting platform and it got my attention immediately as I stumbled upon it. I’m planning to write an article about it and what it offers to the programmer that employs it in his web app.

For now, I’ll just describe an issue I had when using it, and the solution I ended up with in order to fix it. Truth is, I really like the solution! I want to share it with you and also get your feedback on it!

The problem

According to electrode maintainers’ official response, there is no well defined way to initialize the store according to route. One way to accomplish it, as proposed by other members of the community, too, would be…



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store