0
0
Svelteframework~10 mins

Page options (SSR, CSR, prerender) in Svelte - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to disable server-side rendering for this Svelte page.

Svelte
<script context="module">
  export const ssr = [1];
</script>
Drag options to blanks, or click blank then click option'
Afalse
Btrue
Cnull
Dundefined
Attempts:
3 left
💡 Hint
Common Mistakes
Using true instead of false does not disable SSR.
Using null or undefined does not disable SSR.
2fill in blank
medium

Complete the code to enable client-side rendering for this Svelte page.

Svelte
<script context="module">
  export const csr = [1];
</script>
Drag options to blanks, or click blank then click option'
Anull
Btrue
Cfalse
Dundefined
Attempts:
3 left
💡 Hint
Common Mistakes
Setting csr to false disables client-side rendering.
Using null or undefined does not enable CSR.
3fill in blank
hard

Fix the error in the code to prerender this Svelte page.

Svelte
<script context="module">
  export const prerender = [1];
</script>
Drag options to blanks, or click blank then click option'
A"true"
Bfalse
Cnull
Dtrue
Attempts:
3 left
💡 Hint
Common Mistakes
Using "true" as a string causes errors.
Setting prerender to false disables prerendering.
4fill in blank
hard

Fill both blanks to disable SSR and enable CSR for this Svelte page.

Svelte
<script context="module">
  export const ssr = [1];
  export const csr = [2];
</script>
Drag options to blanks, or click blank then click option'
Afalse
Btrue
Cnull
Dundefined
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up true and false values.
Using null or undefined instead of booleans.
5fill in blank
hard

Fill all three blanks to enable prerendering, disable SSR, and enable CSR in this Svelte page.

Svelte
<script context="module">
  export const prerender = [1];
  export const ssr = [2];
  export const csr = [3];
</script>
Drag options to blanks, or click blank then click option'
Afalse
Btrue
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing true and false values.
Using strings instead of booleans.