preactjs/preact-cli

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

Open

#784 opened on 2019年5月4日

GitHub で見る
 (4 comments) (5 reactions) (0 assignees)JavaScript (4,674 stars) (415 forks)batch import
enhancementhelp wantedneed more info

説明

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.

コントリビューターガイド

Serialize and hydrate data from prerender-urls on the client. · preactjs/preact-cli#784 | Good First Issue