TylerShin / beyond.ts

88 stars 6 forks source link

SSR doesn't include github information in __INITIAL_STATE__ #4

Closed shota closed 7 years ago

shota commented 7 years ago

SSR is intended to generate HTMLs statically, but when I when to demo website async example (https://d3ujodob71n39b.cloudfront.net/users/tylorshin), this example use ajax to request github. I think this is not good example for SSR, please refer following pull requests, too.

3

TylerShin commented 7 years ago

At first, thanks for your feedback. As microservice architecture the server(Lambda) should make ajax call to API server for drawing entire HTML page. If don't do like this, the webpage that data relevant part will be missed and that is not good for SEO.

So, how you think about this? Am I understand what you wrote?

Anyway, thanks for your feedback again.

shota commented 7 years ago

Hi, thank you for reply.

Your reply is right. However, in page like here (https://d3ujodob71n39b.cloudfront.net/users/tylorshin), web-browser send request to github to grab information and render. So the page itself is not SEO friendly and this is not intended.

I've not try to deploy cloned code yet, but demo website has to change.

TylerShin commented 7 years ago

@shota Sorry for suuuuuuper late reply. I found the problem you mentioned and solve it. now I'm trying to upgrade all dependencies and fix SSR data loading problem. It's almost done, and will be deployed soon. Sorry again to my late reply. I was too busy because I've changed company.

TylerShin commented 7 years ago

@shota It's updated now. all problems in above have gone.