2023-03-08 21:13:06 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
Hello World
|
|
|
|
<div id="locator-for-playwright">
|
|
|
|
<!-- single child -->
|
2023-11-09 17:01:13 +00:00
|
|
|
<NuxtClientFallback
|
|
|
|
fallback-tag="span"
|
|
|
|
class="break-in-ssr"
|
|
|
|
fallback="this failed to render"
|
|
|
|
>
|
2023-03-08 21:13:06 +00:00
|
|
|
<BreakInSetup />
|
|
|
|
</NuxtClientFallback>
|
|
|
|
<!-- multi child -->
|
|
|
|
<NuxtClientFallback>
|
|
|
|
<BreakInSetup class="broke-in-ssr" />
|
|
|
|
<BreakInSetup />
|
|
|
|
</NuxtClientFallback>
|
|
|
|
<!-- don't render if one child fails in ssr -->
|
|
|
|
<NuxtClientFallback>
|
|
|
|
<BreakInSetup />
|
2023-11-27 23:02:02 +00:00
|
|
|
<Counter
|
2023-11-09 17:01:13 +00:00
|
|
|
id="sugar-counter"
|
|
|
|
:multiplier="multiplier"
|
|
|
|
/>
|
2023-03-08 21:13:06 +00:00
|
|
|
</NuxtClientFallback>
|
|
|
|
<!-- nested children fails -->
|
|
|
|
<NuxtClientFallback>
|
|
|
|
<div>
|
|
|
|
<BreakInSetup />
|
|
|
|
</div>
|
2023-11-27 23:02:02 +00:00
|
|
|
<Counter :multiplier="multiplier" />
|
2023-03-08 21:13:06 +00:00
|
|
|
</NuxtClientFallback>
|
|
|
|
<!-- should be rendered -->
|
|
|
|
<NuxtClientFallback fallback-tag="p">
|
|
|
|
<FunctionalComponent />
|
|
|
|
</NuxtClientFallback>
|
|
|
|
<!-- fallback -->
|
|
|
|
<NuxtClientFallback>
|
|
|
|
<BreakInSetup />
|
|
|
|
<template #fallback>
|
|
|
|
<div>Hello world !</div>
|
|
|
|
</template>
|
|
|
|
</NuxtClientFallback>
|
|
|
|
<ClientFallbackStateful />
|
|
|
|
<ClientFallbackStatefulSetup />
|
|
|
|
<ClientFallbackNonStatefulSetup />
|
|
|
|
<ClientFallbackNonStateful />
|
2023-11-03 21:04:26 +00:00
|
|
|
<ClientFallbackAsyncSetup />
|
2023-05-14 21:22:54 +00:00
|
|
|
<NuxtClientFallback keep-fallback>
|
|
|
|
<div>
|
|
|
|
<BreakInSetup />
|
|
|
|
</div>
|
|
|
|
<template #fallback>
|
|
|
|
<div id="keep-fallback">
|
|
|
|
keep fallback in client
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</NuxtClientFallback>
|
2023-03-08 21:13:06 +00:00
|
|
|
</div>
|
2023-11-09 17:01:13 +00:00
|
|
|
<button
|
|
|
|
id="increment-count"
|
|
|
|
@click="multiplier++"
|
|
|
|
>
|
2023-03-08 21:13:06 +00:00
|
|
|
increment count
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
const multiplier = ref(0)
|
|
|
|
</script>
|