preactjs/preact-cli

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

Open

#784 geöffnet am 4. Mai 2019

Auf GitHub ansehen
 (4 Kommentare) (5 Reaktionen) (0 zugewiesene Personen)JavaScript (415 Forks)batch import
enhancementhelp wantedneed more info

Repository-Metriken

Stars
 (4.674 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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.

Contributor Guide