Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Conversation

Nkzn
Copy link
Contributor

@Nkzn Nkzn commented Sep 10, 2021

The ssr-data in HTML is not passed to props, because

  • createPageRoute sets ssrData (in pagedata://) to page component props
  • loadSSRDataFromTag sets ssr-data from HTML into memory (pagedata://)
  • createPageRoute is called before loadSSRDataFromTag is called.
    • page component gets empty props

so, I moved loadSSRDataFromTag before createPageRoute.

test

examples/hello-world-ssr is same as SSR sample in the document.

  1. run the sample
  2. check the serverTime in HTML is passed to UI

@Nkzn Nkzn requested a review from ije as a code owner September 10, 2021 10:05
Copy link
Member

@ije ije left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, my bad refactor! lgtm, thanks @Nkzn

@ije ije merged commit 2d5f897 into alephjs:master Sep 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants