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

Implementing isomorphic handoff for the product detail page

Having successfully implemented the isomorphic handoff procedure on the products listing page using the ERDA strategy, let's focus on implementing isomorphic handoff for the product detail page.

To implement the Encode step, we first need to identify the data object that will represent the state we wish to persist to the client. We identify the data object by examining the ProductDetailHandler function found in the handlers/productdetail.go source file. This is the server-side handler function responsible for servicing the /product-detail route:

func ProductDetailHandler(env *common.Env) http.Handler {  return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { vars := ...

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