skip to content

UI Frameworks

The component frameworks you would actually choose between when building an interface, from browser libraries like React, Vue, and Svelte to desktop shells like Electron, Tauri, Qt, and JavaFX. Interviewers use this area to see whether you can compare rendering and reactivity models rather than only knowing the one framework on your CV.

on this pageshow

explore

→ has its own guide

questions

1,397 · 4 sections

In React 19, what exactly is a function component, how does it differ from a class component, and is there anything a class can still do that a function cannot?

level: juniorimportance: must knowfreq 80%
basics
~20 s

A function component is a plain function that takes a props object and returns React elements, using hooks for state and effects. A class extends React.Component and implements render() plus lifecycle methods. Only error boundaries still require a class.

open as a page

In React, an inline handler such as onClick={() => setOpen(true)} is a brand-new function on every render. Why does that happen, and when is it actually a problem?

level: juniorimportance: must knowfreq 78%
basics
~20 s

Every render re-runs the component body, so the arrow expression evaluates again into a new function object. The allocation itself is cheap; the new identity only matters where something compares it, such as a memoized child or a dependency array.

open as a page

In React JSX, what is the difference between writing onClick={handleClick} and onClick={handleClick()}, and what actually happens with the second form?

level: juniorimportance: must knowfreq 72%
basics
~20 s

The first passes the function so React can call it on click. The second calls it during render and passes its return value, usually undefined, so nothing happens on click and the side effect fires on every render.

open as a page

In a React onSubmit or onClick handler, why does `return false` not stop the browser's default behaviour, and what do you write instead?

level: juniorimportance: must knowfreq 50%
basics
~10 s

React ignores a handler's return value entirely. Returning false only cancels defaults in inline HTML attributes and jQuery handlers. In React you call e.preventDefault(), and e.stopPropagation() separately if you also want to stop bubbling.

open as a page

In React 19, what object does React pass to an event handler such as onClick, and how do you reach the underlying browser event from it?

level: juniorimportance: must knowfreq 65%
basics
~10 s

React passes a SyntheticEvent: a cross-browser wrapper that mirrors the DOM event interface (type, target, preventDefault, stopPropagation). The untouched browser event is always available on e.nativeEvent for anything React does not normalize.

open as a page

In Angular, how do you slide a toast notification in and out with animate.enter and animate.leave when an @if block toggles it?

level: juniorimportance: must knowfreq 55%
basics
~20 s

Put animate.enter="toast-in" and animate.leave="toast-out" on the toast element inside @if. Angular adds the enter class when the element is inserted and removes it afterwards; on removal it adds the leave class and keeps the element until that animation ends.

open as a page

In Angular's legacy @angular/animations package, how do trigger(), state(), style(), transition() and animate() work together to animate a panel open and closed?

level: juniorimportance: must knowfreq 45%
basics
~20 s

trigger() names an animation bound in the template as [@name]; state() pairs a state value with the style() it rests in; transition() matches a change such as 'open <=> closed' and runs animate() steps. It needs provideAnimationsAsync() or an equivalent provider.

open as a page

In Angular, what does the default ErrorHandler do with an uncaught error, and how do you replace it with your own class?

level: juniorimportance: must knowfreq 55%
basics
~10 s

Angular's default ErrorHandler only logs the error with console.error. To replace it, write a class with a handleError(error) method and register { provide: ErrorHandler, useClass: MyHandler } in the application's providers.

open as a page

In Angular, what does provideAppInitializer do, and why did it replace the APP_INITIALIZER token?

level: juniorimportance: must knowfreq 52%
basics
~10 s

provideAppInitializer registers a function Angular runs during bootstrap, before the root component is created; if it returns a Promise or Observable, startup waits for it. It replaced the APP_INITIALIZER multi-provider token, deprecated since v19.

open as a page

In Angular, what do the declarations, imports, exports, providers and bootstrap fields of an @NgModule each do?

level: juniorimportance: must knowfreq 70%
basics
~10 s

declarations lists the non-standalone components, directives and pipes a module owns; imports brings in what its templates use; exports shares declarables with importers; providers registers services; bootstrap names the root component bootstrapModule renders.

open as a page

In Vue 3, how do you make a $formatCurrency helper available in every component template, and what Vue 2 mechanism did that replace?

level: juniorimportance: must knowfreq 55%
basics
~20 s

Assign it to app.config.globalProperties.$formatCurrency before mounting. It replaces Vue 2's Vue.prototype: templates and Options API this can read it, but a component's own property of the same name wins and script setup code cannot use this.

open as a page

In Vue 3, what does app.mount() return, and why does createApp(App).mount('#app').use(plugin) fail?

level: juniorimportance: must knowfreq 70%
basics
~20 s

app.mount() renders the root component into the container and returns the root component instance, not the app. That instance has no use() method, so chaining .use() after mount throws; configure and register everything first, then call mount last.

open as a page

In Vue 3, what is a plugin, and what exactly happens when you call app.use(plugin, options)?

level: juniorimportance: must knowfreq 62%
basics
~20 s

A Vue 3 plugin is an object with an install(app, options) method, or a bare function used as install. app.use calls it synchronously with the app and any extra arguments, installs it once per app, and returns the app.

open as a page

In Vue 3, what changes when you wrap a tab's dynamic component in `<KeepAlive>` and the user leaves a half-filled long form and comes back?

level: juniorimportance: must knowfreq 58%
basics
~20 s

Without KeepAlive, Vue unmounts the form's component when the tab switches away and builds a fresh one on return, losing every typed value. KeepAlive deactivates and caches the instance instead, so the same instance, state and DOM come back.

open as a page

In Vue 3, how does the built-in `<Teleport>` fix a modal clipped inside a deeply nested scrolling container, and what does its `to` prop accept?

level: juniorimportance: must knowfreq 62%
basics
~20 s

Vue's <Teleport> renders its slot content into another DOM node, typically body, so ancestor overflow, transforms and stacking contexts stop constraining the modal. Its to prop takes a CSS selector string or an actual DOM element.

open as a page

In a component tree, what is an ancestor-provided value and what problem does it solve?

level: juniorimportance: must knowfreq 72%
basics
~20 s

A value an ancestor publishes to its whole subtree so any descendant can read it where it is used, instead of every component on the path accepting and forwarding an input it does not need.

open as a page

In a component framework, what does a default content slot do, and who owns the content that lands in it?

level: juniorimportance: must knowfreq 78%
basics
~20 s

A default content slot is a placeholder where a component renders whatever content its caller passed between its tags. The caller writes and owns that content; the component only chooses where, and whether, it appears.

open as a page

What is a host-node reference in a component framework, and when is it safe to read?

level: juniorimportance: must knowfreq 72%
basics
~20 s

A host-node reference is a container the framework fills with the real node it created for a rendered element, so code can focus, scroll or measure it. It is empty while output is described and filled once that output is committed.

open as a page

In a component framework, what are a component's declared inputs, and why must the child treat them as read-only?

level: juniorimportance: must knowfreq 85%
basics
~20 s

Declared inputs are the named values a parent passes into a child to parameterize it. The parent owns each one and re-supplies it every render, so the child only reads: a write there never reaches the owner.

open as a page

In a component framework, what is the difference between a component's definition, a live instance, and the output it produces?

level: juniorimportance: must knowfreq 76%
basics
~20 s

A definition is the reusable recipe: a function, a class or a compiled template. An instance is one live copy created where that definition is used, owning its own state. The output is the description the instance produces each update.

open as a page