Recall & Review
beginner
What is the main difference in how Svelte works compared to React and Vue?
Svelte compiles your code to efficient JavaScript at build time, so it updates the DOM directly without a virtual DOM. React and Vue use a virtual DOM to update the UI at runtime.
Click to reveal answer
beginner
How does React manage component state compared to Svelte?
React uses hooks like useState to manage state inside components, while Svelte uses reactive assignments and special syntax ($:) to update state automatically.
Click to reveal answer
beginner
What makes Vue's template syntax different from React's JSX?
Vue uses an HTML-based template syntax that feels like writing regular HTML with special directives, while React uses JSX which mixes JavaScript and HTML-like code inside components.
Click to reveal answer
intermediate
Which framework is known for having the smallest bundle size and why?
Svelte usually produces the smallest bundle size because it compiles away the framework code at build time, leaving only the minimal JavaScript needed to run your app.
Click to reveal answer
intermediate
How do React, Vue, and Svelte handle reactivity differently?
React re-renders components when state changes via hooks, Vue tracks dependencies reactively using proxies, and Svelte compiles reactive code that updates the DOM directly without extra runtime overhead.
Click to reveal answer
Which framework compiles your code at build time to optimize performance?
✗ Incorrect
Svelte compiles your code at build time, unlike React and Vue which use runtime virtual DOM.
What syntax does React use to write UI components?
✗ Incorrect
React uses JSX, which mixes JavaScript and HTML-like syntax.
Which framework uses a virtual DOM to update the UI?
✗ Incorrect
React uses a virtual DOM. Vue also uses a virtual DOM, but the question asks for one correct answer.
Vue's template syntax is closest to which of these?
✗ Incorrect
Vue uses HTML templates with special directives like v-if and v-for.
Which framework typically results in the smallest JavaScript bundle size?
✗ Incorrect
Svelte compiles away framework code, leading to smaller bundles.
Explain how Svelte's approach to updating the UI differs from React and Vue.
Think about when and how the UI changes happen.
You got /4 concepts.
Compare the template or syntax styles used by React, Vue, and Svelte.
Focus on how you write the UI code in each.
You got /3 concepts.