exploration(hyperdrive): problem statement (#219)
This commit is contained in:
parent
bcbb517828
commit
a4ea634b5c
1 changed files with 8 additions and 2 deletions
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
import Layout from "../../components/Layout.astro";
|
import Layout from "../../components/Layout.astro";
|
||||||
|
|
||||||
const Counter = {
|
const Counter = {
|
||||||
count: 0,
|
count: 0,
|
||||||
increment() {
|
increment() {
|
||||||
|
@ -13,5 +12,12 @@ const Counter = {
|
||||||
---
|
---
|
||||||
|
|
||||||
<Layout title="Hyperdrive Experiment">
|
<Layout title="Hyperdrive Experiment">
|
||||||
|
<!-- PROBLEM STATEMENT
|
||||||
|
This is the problem that `hyperdrive` is trying to solve.
|
||||||
|
After this is rendered in the server, the Counter object is not serialized.
|
||||||
|
When the HTML reaches the browser, it has no idea what Counter is.
|
||||||
|
-->
|
||||||
|
<button onclick="Counter.increment()">
|
||||||
{Counter.count}
|
{Counter.count}
|
||||||
|
</button>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
Loading…
Reference in a new issue