preactjs/preact-cli

Serialize and hydrate data from prerender-urls on the client.

Open

#784 建立於 2019年5月4日

在 GitHub 查看
 (4 留言) (5 反應) (0 負責人)JavaScript (415 fork)batch import
enhancementhelp wantedneed more info

倉庫指標

Star
 (4,674 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

It would be good if we could detect that prerender-urls has passed more than { url, title } as the data for a given route, and serialize that into the HTML:

<script type="text/props" id="appprops">
  { "url": "/profile/john", "profile": { "name": "John Doe" } }
</script>

Then we can pass these to <App /> when booting on the client.

貢獻者指南