🌍 Front-end Web Development · subject

Front-end Web Development Frameworks and Libraries Syllabus

The Frameworks and Libraries syllabus for Front-end Web Development in full: 3 chapters and 9 topics, every one listed below, plus 51 Frameworks and Libraries flashcards with answers.

3Chapters
9Topics
51Flashcards

Frameworks and Libraries syllabus: all 3 chapters

Expand any chapter to see its topics and sub-topics.

  1. React

    3 topics
    • JSX
    • Components
    • State and Props
  2. Vue

    3 topics
    • Vue Instance
    • Components
    • Directives
  3. Angular

    3 topics
    • Modules
    • Components
    • Services

Front-end Web Development Frameworks and Libraries flashcards — 51 questions with answers

  1. What does JSX stand for, and what is it?

    JSX stands for JavaScript XML. It is a syntax extension for JavaScript that lets you write HTML-like markup directly inside JavaScript, used primarily with React to describe UI.

  2. Is JSX required to use React?

    No. JSX is optional syntactic sugar. JSX compiles down to React.createElement() calls, which you could write by hand, but JSX is the standard, more readable approach.

  3. What does a JSX element compile to under the hood?

    A call to React.createElement(type, props, ...children), which returns a plain JavaScript object (a React element) describing what to render.

  4. Why must JSX expressions return a single root element?

    Because JSX compiles to a single React.createElement call, a component must return one parent node. Multiple siblings must be wrapped in a parent element or a Fragment (<>...</>).

  5. How do you embed a JavaScript expression inside JSX?

    Wrap it in curly braces, e.g. <h1>{user.name}</h1> or {2 + 2}. Only expressions are allowed, not statements like if or for.

  6. In JSX, why is the HTML 'class' attribute written as 'className'?

    Because 'class' is a reserved word in JavaScript. JSX uses className instead, and camelCase for most attributes (e.g. htmlFor, tabIndex).

  7. How are inline styles written in JSX?

    As a JavaScript object with camelCased properties passed to the style attribute, e.g. style={{ backgroundColor: 'blue', fontSize: 14 }} (note the double braces).

  8. How do you write comments inside JSX?

    Use curly braces with a JavaScript block comment: {/* this is a comment */}.

  9. Why must every element in a JSX list have a unique 'key' prop?

    Keys give React a stable identity for each list item so it can efficiently match, reorder, and update elements during reconciliation. Keys should be stable and unique among siblings, ideally not array indexes.

  10. How do you conditionally render an element in JSX using the logical AND operator?

    Use {condition && <Element/>}. If condition is truthy the element renders; if falsy, nothing renders. The ternary {cond ? <A/> : <B/>} handles else cases.

  11. What is a React component?

    A reusable, self-contained piece of UI defined as a JavaScript function (or class) that returns React elements (JSX) describing what should appear on screen.

  12. What is the naming rule that distinguishes a React component from an HTML element in JSX?

    Component names must start with a capital letter (e.g. <MyButton/>). Lowercase names (e.g. <button/>) are treated as built-in HTML DOM tags.

  13. What are the two ways to define a component in React?

    Function components (a JavaScript function returning JSX, now the standard) and class components (an ES6 class extending React.Component with a render() method).

  14. What is the difference between a presentational (dumb) and a container (smart) component?

    Presentational components focus on how things look, receiving data via props and being mostly stateless. Container components focus on how things work, managing state and logic and passing data down to presentational components.

  15. What does it mean to 'compose' components?

    Composition is building complex UIs by nesting and combining smaller components, passing data and elements (via props, including children) rather than using inheritance.

  16. What is the special 'children' prop in React?

    props.children holds whatever JSX is nested between a component's opening and closing tags, letting a component wrap and render arbitrary content passed to it.

  17. What are props in React?

    Props (properties) are read-only inputs passed from a parent component to a child component as attributes, used to configure and customize the child.

  18. Why are props considered immutable / read-only?

    A component must never modify its own props. React enforces a one-way data flow: data flows down from parent to child, and the parent owns and controls the prop values.

  19. What is state in React?

    State is data that is private to and managed within a component, which can change over time (e.g. via user interaction). When state changes, the component re-renders.

  20. What is the key difference between state and props?

    Props are passed in from a parent and are read-only (owned externally); state is internal, mutable, and managed by the component itself. Both trigger re-renders when changed.

Show the other 31 Frameworks and Libraries flashcards
  1. What hook is used to add state to a function component, and what does it return?

    The useState hook. It returns an array of two items: the current state value and a setter function, e.g. const [count, setCount] = useState(0).

  2. Why should you never mutate state directly (e.g. state.value = 5)?

    React won't detect the change and won't re-render. You must use the setter function (e.g. setState/setCount), which schedules a re-render and may batch updates.

  3. What does 'lifting state up' mean in React?

    Moving shared state to the closest common ancestor of components that need it, so the parent holds the state and passes it down via props, keeping the components in sync.

  4. Why does the useState setter sometimes take a function argument like setCount(c => c + 1)?

    The functional updater form uses the latest state value, which is essential when updating based on previous state, especially with batched or asynchronous updates.

  5. How is data passed from a child back up to a parent in React?

    The parent passes a callback function down as a prop; the child calls that function (often with data) to notify the parent, since data itself only flows downward.

  6. What is a Vue instance and how is it created (Vue 2)?

    A Vue instance is the root of every Vue application, created with new Vue({ ... }). It connects Vue's reactivity and behavior to a DOM element specified by the options object.

  7. What is the purpose of the 'el' option in a Vue instance?

    The el option mounts the Vue instance to an existing DOM element via a CSS selector (e.g. el: '#app'), telling Vue which part of the page it controls.

  8. How is the root application created in Vue 3 instead of 'new Vue'?

    With createApp(options).mount('#app'). Vue 3 replaces the Vue 2 'new Vue({ el })' pattern with the createApp factory function and an explicit mount call.

  9. Why must the 'data' option be a function in a Vue component (rather than an object)?

    So each component instance gets its own independent copy of the data. If data were a shared object, all instances would share the same state and interfere with each other.

  10. What are the main lifecycle hooks of a Vue instance, in order?

    beforeCreate, created, beforeMount, mounted, beforeUpdate, updated, and beforeUnmount (beforeDestroy in Vue 2) / unmounted (destroyed in Vue 2).

  11. What is the difference between a computed property and a method in Vue?

    Computed properties are cached based on their reactive dependencies and only re-evaluate when those change; methods run every time they are called. Use computed for derived data.

  12. What is the difference between 'computed' and 'watch' in Vue?

    Computed properties declaratively derive a value from reactive data (synchronous, cached). Watchers run custom side-effect logic in response to a specific data change (good for async or expensive operations).

  13. How do you register a global component in Vue?

    Using app.component('my-component', { ... }) in Vue 3 (or Vue.component in Vue 2), making it available everywhere without local import.

  14. How do you pass data into a Vue component, and how is it declared?

    Via props: the parent binds an attribute (e.g. :title="msg"), and the child declares it in its props option (e.g. props: ['title'] or props: { title: String }).

  15. How does a Vue child component communicate an event back to its parent?

    It emits a custom event with this.$emit('eventName', payload), and the parent listens with @eventName="handler" on the component tag.

  16. What is a 'slot' in Vue?

    A slot is a placeholder (<slot></slot>) in a child component's template where the parent can inject custom content, enabling component composition similar to React's children.

  17. What is a single-file component (SFC) in Vue?

    A .vue file containing three blocks: <template> (markup), <script> (logic/options), and <style> (CSS), bundling a component's structure, behavior, and styling in one file.

  18. What is a Vue directive?

    A special HTML attribute prefixed with 'v-' that applies reactive behavior to the DOM, e.g. v-if, v-for, v-bind, telling Vue to do something special with that element.

  19. What do the v-if and v-show directives do, and how do they differ?

    Both conditionally display an element. v-if actually adds/removes the element from the DOM (and is lazy), while v-show keeps it in the DOM and toggles its CSS display property (cheaper toggling).

  20. What does the v-for directive do, and what should accompany it?

    v-for renders a list by iterating over an array or object, e.g. v-for="item in items". It should always be paired with a unique :key binding for efficient DOM updates.

  21. What does v-bind do, and what is its shorthand?

    v-bind dynamically binds an attribute or prop to an expression, e.g. v-bind:href="url". Its shorthand is the colon, e.g. :href="url".

  22. What does v-on do, and what is its shorthand?

    v-on attaches an event listener, e.g. v-on:click="handler". Its shorthand is the @ symbol, e.g. @click="handler".

  23. What does v-model provide, and on what is it built?

    v-model creates two-way data binding between a form input and component state. It is syntactic sugar combining a value binding (v-bind) with an input event listener (v-on).

  24. What is the difference between v-html and v-text (and the {{ }} interpolation)?

    {{ }} and v-text insert content as plain text (escaped). v-html renders a string as actual HTML, which can introduce XSS risk if the content is untrusted.

  25. What is a custom directive in Vue, and give an example use case?

    A user-defined v- directive (registered via app.directive) for low-level DOM manipulation, e.g. a v-focus directive that calls element.focus() when the element is inserted.

  26. What is the difference between an ES module 'named export' and a 'default export'?

    A module can have many named exports (imported with braces by their exact names: import { foo } from './m') but only one default export (imported without braces under any name: import foo from './m').

  27. What is the difference between a library and a framework?

    With a library, your code calls the library (you control flow), e.g. React's view layer. With a framework, the framework calls your code and dictates structure (inversion of control), e.g. Angular or a full Vue app setup.

  28. What is a service in front-end architecture (e.g. Vue/Angular), and what is its purpose?

    A service is a reusable module/class that encapsulates business logic, data access, or API calls, keeping components lean and promoting separation of concerns and code reuse.

  29. How are services typically shared in a Vue application, and what JS pattern do they often use?

    As importable ES modules, often exposing a single shared instance (singleton pattern) so all components use the same service for API calls or shared state.

  30. What is dependency injection, and how does it relate to services?

    Dependency injection is a pattern where a component receives its dependencies (like services) from the outside rather than creating them itself, improving testability and decoupling. Vue offers provide/inject for this.

  31. Why is separating API/service logic out of components considered a best practice?

    It improves reusability (multiple components share one service), testability (logic can be tested in isolation), and maintainability (UI and data concerns are decoupled following separation of concerns).

Front-end Web Development Frameworks and Libraries FAQ

What is in the Front-end Web Development Frameworks and Libraries syllabus?

Front-end Web Development Frameworks and Libraries is split into 3 chapters: React, Vue and Angular. Together they contain 9 topics.

How many chapters are in Front-end Web Development Frameworks and Libraries?

3 chapters, containing 9 topics. The largest chapter is React, with 3 topics.

Are there flashcards for Front-end Web Development Frameworks and Libraries?

Yes — a 51-card Frameworks and Libraries deck, printed in full in the flashcards section of this page and available in the Examius app with spaced repetition. The free plan covers one exam of your choice, including its flashcards; Examius Pro, a one-time purchase, unlocks every other exam and deck.