preactjs/preact-cli

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

Open

#784 aperta il 4 mag 2019

Vedi su GitHub
 (4 commenti) (5 reazioni) (0 assegnatari)JavaScript (415 fork)batch import
enhancementhelp wantedneed more info

Metriche repository

Star
 (4674 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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.

Guida contributor