O'Reilly logo

Isomorphic Go by Kamesh Balasubramanian

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Encode step

Our goal to regenerate the state on the client side begins by identifying the data object that represents the state we wish to retain in order to maintain state in a particular web page. To identify the object, we simply need to take a look at the server-side handler function that produced the rendered web page output. For example, in the products listing page, the slice of Product objects would be the data object that we would want to retain to the client side, so that the web page rendered on the client-side would render the same list of products.

We can expose the slice of the Product objects to the client side by implementing a Rest API Endpoint (depicted in Figure 6.2). The Encode step (depicted in Figure 6.1), consists ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required