mozilla / addons

☂ Umbrella repository for Mozilla Addons ✨
Other
125 stars 41 forks source link

Load star rating breakdown on the server (not the client) #12170

Closed kumar303 closed 5 years ago

kumar303 commented 6 years ago

Describe the problem and steps to reproduce it:

What happened?

The star rating breakdown should render immediately, without any loading indicators

What did you expect to happen?

You see loading indicators while the client fetches the data.

Anything else we should know?

It is important to load this data on the server for SEO so that crawlers can see star rating breakdowns for each add-on.

The problem lies in how we can only rely on a double render to load data on the server. The first render dispatches an action to load the add-on. The second render dispatches an action to load the star rating data but this is too late for server side rendering.

kumar303 commented 5 years ago

The new designs will address this in a new way. That is, we won't need SSR here.