Skip to content
tezvyn:

Search

Find a bite, explore a topic or look for a role.

Results for React

Bites 747

How do you mock an async service call in an Angular component test?
Vue, Angular & Svelte2 min read

How do you mock an async service call in an Angular component test?

This tests Angular unit isolation and HTTP mocking. A strong answer covers HttpTestingController setup, flushing a mock response, asserting UI changes, and notes mocking avoids flaky networks. Red flag: using real HTTP calls in unit tests.

Vue, Angular & Svelte2 min read

Share state between sibling components without a state library

Tests if you over-engineer simple sibling state. Good answers lift state to the common parent, passing data down via props and changes up via events; or use built-in primitives like Svelte stores or an Angular shared service.

Vue, Angular & Svelte2 min read

How do CSS Modules differ from Vue scoped CSS?

This question tests build-time versus compiler style isolation. CSS Modules export a hashed class mapping object; Vue scoped CSS adds unique data-attributes. You bind templates via $style.myClass or an imported object. Red flag: claiming both use attributes.

Compare Angular's three ViewEncapsulation modes and give a use case.
Vue, Angular & Svelte2 min read

Compare Angular's three ViewEncapsulation modes and give a use case.

This tests style isolation tradeoffs. Emulated scopes CSS with unique attributes, ShadowDom uses native shadow roots, and None disables scoping. Switch to ShadowDom for strict boundaries or None for global themes.

What is ngOnInit's purpose and why prefer it over the constructor?
Vue, Angular & Svelte2 min read

What is ngOnInit's purpose and why prefer it over the constructor?

Tests Angular lifecycle timing and input binding. Strong answer: ngOnInit runs once after inputs are initialized, but the constructor instantiates the class before bindings exist.

Vue, Angular & Svelte2 min read

In Vue 3, what problem does Teleport solve?

This tests DOM hierarchy and CSS stacking context. A strong answer covers how Teleport moves markup to a target like body to escape ancestor transforms and z-index ceilings trapping fixed modals. Red flag: claiming it is only for cleaner HTML.

Vue, Angular & Svelte2 min read

How do you pass markup from a parent to a child component?

This tests declarative composition for UI reuse. A strong answer covers default and named slot syntax in Vue/Svelte (slot outlet, v-slot) or Angular ng-content with select for named projection.

Vue, Angular & Svelte2 min read

Explain key or trackBy in list rendering and index key risks

Your understanding of virtual DOM reconciliation and stable element identity. A good answer covers that key binds DOM state to data identity, and that index keys break reordering by recycling wrong components.

What bindings do v-model and ngModel sugar, and why?
Vue, Angular & Svelte2 min read

What bindings do v-model and ngModel sugar, and why?

V-model sugars value and input; ngModel sugars [value] and (ngModelChange). This enforces one-way data flow for predictable state.

Explain Vite dependency pre-bundling, startup speed, and CommonJS handling
Vue, Angular & Svelte2 min read

Explain Vite dependency pre-bundling, startup speed, and CommonJS handling

This tests whether you understand Vite's ESM-first dev server constraints. Pre-bundling converts CJS/UMD to ESM and collapses multi-file ESM deps into single modules to stop 600+ request waterfalls.

How does src/routes determine routing in SvelteKit?
Vue, Angular & Svelte2 min read

How does src/routes determine routing in SvelteKit?

Src/routes mirrors URLs, folders become paths, [slug] creates dynamic params, and +page.svelte renders pages.

What is the primary end-user benefit of Svelte's compiler-first approach?
Vue, Angular & Svelte2 min read

What is the primary end-user benefit of Svelte's compiler-first approach?

Tests if you connect compiler architecture to user-facing performance. Strong answer: build-time work shrinks bundles and reduces browser overhead for faster loads on slow devices. Red flag: answering with developer ergonomics instead of runtime performance.

What out-of-the-box Angular features require manual setup in Vue or Svelte?
Vue, Angular & Svelte2 min read

What out-of-the-box Angular features require manual setup in Vue or Svelte?

Tests whether you understand framework scope tradeoffs. A strong answer cites first-party routing, forms, dependency injection, and Signals, then contrasts them with Vue or Svelte's add-on ecosystem.

Vue, Angular & Svelte2 min read

Virtual DOM Diffing: Minimal DOM Surgery

Virtual DOM diffing finds the smallest real DOM ops to sync a lightweight tree with new state. Frameworks batch rapid UI changes instead of repainting everything. The footgun is treating the diff as free; missing keys in lists force expensive reconciliation.

How do you mitigate confirmation bias when a user validates your solution?
UX Research2 min read

How do you mitigate confirmation bias when a user validates your solution?

In the moment, probe for exceptions; in synthesis, triangulate and invite reviewers.

UI Design & Figma2 min read

Monolithic or multiple libraries for cross-platform design system?

This tests cross-platform design system architecture. Pick multiple interconnected libraries, centralize tokens in a shared primitive layer, and branch platform components downstream. Red flag: one monolithic file ignoring native rendering constraints.

UI Design & Figma2 min read

How do you review and accept shared library component updates?

Inspect Updates, accept selectively to preserve overrides, and notify stakeholders.

UI Design & Figma2 min read

How would you architect a Figma-to-code icon system?

Tests design-to-code systems thinking. Strong answers cover Figma variables as source of truth, automated API exports into transformed versioned packages, and strict naming taxonomy. Red flag: manual SVG exports and developers editing assets by hand.

Figma Constraints vs Auto Layout: when are Constraints preferable?
UI Design & Figma2 min read

Figma Constraints vs Auto Layout: when are Constraints preferable?

This tests resizing logic in Figma. A strong answer states Auto Layout resizes frames to fit content, while Constraints make objects respond to parent frames. It then cites responsive containers, say fluid inputs.

UI Design & Figma2 min read

Why use button variants instead of separate components per state?

Tests Figma component set organization and scalability. Strong answers cite flexible property mixing, reduced combinatorial bloat, and cleaner dev handoff. Red flag: saying only "it's cleaner" without naming navigability or system integrity.