r/Frontend • • 4h ago

When should a frontend form validate: while typing, on blur, or only on submit?

10 Upvotes

I've been thinking about how to handle validation in forms, especially when some fields require an API request.

For example, imagine a registration form with a username field. We need to check:

  • Is the username in the correct format?

  • Is it already taken?

  • Is the availability request still relevant if the user keeps typing?

  • What happens if an older API response arrives after a newer one?

There are a few approaches:

  1. Validate on every keystroke.

  2. Validate when the user leaves the field (blur).

  3. Debounce API checks while typing.

  4. Perform final validation again when the form is submitted.

Personally, I think a combination of immediate local validation, debounced availability checks and final server-side validation makes sense.

But I'm curious how other frontend developers handle this in production.

A few questions:

  • Do you prefer validation on blur or while typing?

  • How do you prevent stale API responses from showing incorrect errors?

  • Do you use a form library or handle this logic yourself?

Interested in hearing what has worked well in real projects.


r/Frontend • • 17h ago

Team building event ideas that work for hybrid teams

3 Upvotes

Half the team is remote, half is in-office. Most classic team-building activities fall flat for one group or the other.

Looking for ideas that feel fair and actually build connection across locations. What’s worked for your hybrid teams?


r/Frontend • • 1d ago

EPAM Frontend Engineer – JavaScript Technical Interview | What to Expect?

15 Upvotes

Hi everyone,

I recently applied for a Frontend Engineer position at EPAM and have an upcoming JavaScript technical interview.

Has anyone recently gone through the technical interview process at EPAM, particularly for a Frontend Engineer or Senior Frontend Engineer position?

I would really appreciate some guidance on the following:

  • What should I expect during the technical interview?

  • Which JavaScript concepts should I focus on?

  • Do they ask live coding questions or problem-solving exercises?

  • Do they cover DSA, React, TypeScript or frontend system design?

  • How difficult is the interview, and how long does it usually last?

  • Are there any specific topics or resources you would recommend preparing?

I applied for a position in the UAE, but interview experiences from other locations would also be helpful.

If anyone has recently interviewed at EPAM, I would really appreciate it if you could share your experience.

Thank you in advance!


r/Frontend • • 1d ago

For listing pages, do you store filters in the URL or component state?

3 Upvotes

I was working through a common frontend scenario: a product listing page with search, category filters and sorting.

There are two approaches I've used:

1. Keep everything in component state

const [category, setCategory] = useState("all");
const [sort, setSort] = useState("newest");

2. Store shareable filters in the URL

const params = new URLSearchParams(window.location.search);

const category = params.get("category") || "all";
const sort = params.get("sort") || "newest";

The URL approach has some useful advantages:

  • Filters survive a page refresh.

  • Users can share the exact filtered view.

  • Browser back and forward navigation can restore previous filters.

But it also means keeping the URL and UI state in sync, which can introduce extra complexity.

I'm curious how others handle this in production.

Do you generally keep filters in component state, sync them with URL parameters, or use a dedicated state-management solution?

Where do you draw the line?


r/Frontend • • 2d ago

The V8 JavaScript Runtime Undermined My Constant-Time JavaScript Library

Thumbnail
soatok.blog
1 Upvotes

r/Frontend • • 2d ago

Analytics dashboard for visualizing typing-game-cli round

Thumbnail
gallery
5 Upvotes

r/Frontend • • 2d ago

Scroll study: the product holds still, the page moves around it

0 Upvotes

The product holds still, the page moves around it, and a fast flick never waits on an animation.

The rules behind it:

  • Steel holds. The product stays put while the story moves around it.

  • Water moves. Backgrounds and transitions get the fluid motion. The interface never does.

  • One accent, last. One color, on one thing, and it lands after everything else settles.

  • Measured in scroll, not time. Triggers and pins are set in screen heights, not milliseconds.

  • If a thumb can outrun it, it never hides content. On a fast flick, every reveal snaps to its finished, readable state. Motion is decoration, not a gate.

Source (plain HTML, no dependencies): https://github.com/scrollmotionstudies/scroll-study-water-steel


r/Frontend • • 3d ago

Share Private Client Demos With Six-Digit Email Codes

Thumbnail
instawormhole.com
0 Upvotes

r/Frontend • • 3d ago

Automated JEV-assisted superfast HTML website builder (OS; MIT)

0 Upvotes

JEV is an ultra-fast classifier from TypeSafe, that answers multiple-choice questions, and I use it to arrange the pre-defined UI elements into a webpage based on the user's prompt. For example, for the prompt e.g. "Frontend for login form" JEV would return something like the following:

"surface": { "type": "choice", "choice": "app-login", "confidence": 1,

"probabilities": { "app-login": 1, "app-signup": 0, "website": 0, "app-checkout": 0, … all 14 etc... etc... } }

And here the "app-login" is a ready-made UI element but one can modify it later in the app manually. So this is what gets inserted into resulting HTML, among other things.

Besides JEV there are many other elements you can play manually with e.g. replace and resize images, add and link pages etc.

Repo: https://github.com/GPTchatly/Forma
Free (with limits) hosted Forma Editor

Many of the UI elements are by Markmead's Hyperui, and Cole Bemis' Feather icons; Fancy Components (by Daniel Petho); Velora UI (Aigars Silkalns); Cult UI (Nolly Studio)


r/Frontend • • 4d ago

Run a Frontend and API Together From One Tunnel File

Thumbnail
instawormhole.com
6 Upvotes

r/Frontend • • 5d ago

Playing with 3D Pixel art

Thumbnail
uicraft.in
7 Upvotes

r/Frontend • • 4d ago

We put a 3D DOM inspector in our open-source browser, and it runs on iOS and Android as well as macOS

Thumbnail
gallery
0 Upvotes

We make Kelpie, an open-source (Apache-2.0) browser for macOS, Windows, Linux, iOS and Android. One part of it that might interest people here is a 3D DOM inspector, a bit like the old Firefox Tilt view.

How it works:

  • Every element is pushed along the Z axis by its depth in the DOM tree. You can see what's nested in what, and spot things like a transparent overlay sitting on top of a button that won't take clicks.

  • It shows DOM depth (nesting), not CSS paint order. The hover panel shows tag, classes, size, original position and z-index.

  • The left toolbar has Rotate, Pan, Scroll and Inspect modes, plus up/down buttons that move along a long page without changing zoom or angle.

  • On the right there's an orientation card (a native screenshot taken before the DOM is transformed, with X/Y/Z rings and Top/Side/Front buttons), zoom, and a layer separation slider from 0 to 80 px.

  • Elements opens the full tree from <html>, including hidden nodes, open shadow roots and same-origin iframes. Hovering a row highlights its plane, and if it's off screen the camera moves to it and keeps its zoom and angle.

  • Limits: closed shadow roots and cross-origin frames can't be shown, and it draws at most 5,000 planes. Nodes past that still show up in the tree. Exiting puts the page's styles and scroll positions back.

On a phone, what you're looking at is the real mobile WebKit or Android WebView rendering, not desktop devtools emulating a phone. That was the main reason we built it.

It's experimental. It works on macOS (WebKit), iOS and Android. On macOS you may need to turn it on in Settings → Experimental.

Downloads are on the releases page: macOS (Apple Silicon), Windows, Linux (.deb, .rpm, AppImage) and an Android preview APK. The iOS app is coming to the App Store; until then you can build it from source.

Repo: https://github.com/UnlikeOtherAI/kelpie Inspector docs: https://github.com/UnlikeOtherAI/kelpie/blob/main/docs/ui/3d-inspector.md

The first image is an illustration we generated. The other two are real screenshots: the inspector on a desktop-width page, and the macOS browser's start page.

What I'd like feedback on: is DOM depth the right thing to put on the Z axis, or would stacking contexts or paint order be more useful to you? And what's missing from the hover panel?


r/Frontend • • 6d ago

Importing Python into React components - wtf?

Thumbnail
gallery
22 Upvotes

I didn’t realise this was possible. Christ webassembly allows for some useful things.


r/Frontend • • 6d ago

Where the Disabled Button Got Its Rule

Thumbnail
hipuku.dev
21 Upvotes

r/Frontend • • 6d ago

Moving our accessibility testing from a paid tool to Claude Code (~500 URLs, WCAG 2.2 AA)

0 Upvotes

QA lead at a large org. We currently do accessibility testing for about 500 website urls to meet WCAG 2.2 AA (all 55 success criteria). And we use a paid tool (like Deque) that helps automate part of this and rest done manually with screen readers and keyboard testing.

Now we are looking to use our AI budget and Claude code to create skills for finding and fixing accessibility issues across our sites. My major trouble is that the scale is huge - not 5-10 URLs or even less than 50.

So would love to hear from anyone already using AI for accessibility to help me out with this journey:

  1. What do you use it for: finding issues, sorting real issues from false positives, or fixing them in code? Roughly how many URLs, under or over 100?

  2. How much of WCAG do you cover with Claude skills versus manually? How bad are the false positives? Asking because paid tool gave us less.

  3. Are you able to run scans at scale on automation infra (like CI) with Claude? And do you report coverage and trends to leadership - if so any dashboard?

  4. What are the challenges with AI skills vs paid tool like Deque or Level Access? Anything you would suggest to keep in mind or be aware upfront?


r/Frontend • • 6d ago

Anecdotally, programmers dislike "reduce"

Thumbnail evanhahn.com
0 Upvotes

r/Frontend • • 7d ago

Front end interviews since AI: what’s been asked of you, and is AI allowed?

137 Upvotes

Been a while since I’ve interviewed, so I’d thought I ask what’s the scene been like lately.

Preferably last six months only.

What was the format: live coding, take-home, system design?

Was AI allowed, banned, or part of the exercise? If you used it, did anyone push back?

If you hire, what do you do now?


r/Frontend • • 6d ago

Ran a Lighthouse audit on tiktok.com desktop web: 14.9s LCP, 5.1s JS execution, and broken bfcache (Performance: 34/100)

0 Upvotes

I got curious about why TikTok's desktop web client feels so sluggish on initial load, so I ran a Chrome DevTools Lighthouse audit (v13.5.0) on tiktok.com to see what the frontend bundle and rendering pipeline actually look like.

The overall scores came back at 34 for Performance, 73 for Accessibility, 54 for Best Practices, and 77 for SEO.

On the Core Web Vitals and rendering side, First Contentful Paint takes 8.0s, Largest Contentful Paint hits 14.9s, Time to Interactive reaches 20.5s, and Total Blocking Time is 1,090 ms. Out of 8.5s of main-thread work, 5.1s goes purely to parsing and evaluating JavaScript. Almost all of that CPU time is spent on cache.react_dom (around 2.5s) and their anti-bot telemetry script webmssdk.js (around 1.8s).

The initial payload is 4,475 KiB, and there are a lot of classic frontend optimization misses in the build. It ships 236 KiB of unused JS on initial load (their regional cookie consent script alone has ~90 KiB of dead code), 26 KiB of unused CSS, and 65 KiB of legacy Babel transforms and polyfills for Baseline features like Array.prototype.includes, Promise.allSettled, and standard classes. Their security SDK (secsdk-lastest.umd.js) is also served unminified, the 400x400 PNG logo is scaled down to 112x112 via CSS, and the custom woff2 fonts are missing font-display rules.

Two other frontend details stood out. First, their privacy loader triggers repeated Permissions-Policy console errors by attaching unload listeners, which alongside Cache-Control: no-store completely breaks Back/Forward Cache restoration. Second, basic markup accessibility is rough: several header icon buttons and the search link have no aria-labels, four text inputs lack associated labels, and white text on their #fe2c55 buttons only hits a 3.68:1 contrast ratio.

I get that they prioritize their mobile apps, so desktop web is clearly an afterthought, but it is still wild seeing a major production React app ship unminified scripts and ES5 polyfills in 2026. Have any of you run into similar bottlenecks trying to keep Core Web Vitals green when security or product teams mandate heavy fingerprinting SDKs on initial load?


r/Frontend • • 8d ago

How do you prevent stale API results in search-as-you-type interfaces?

5 Upvotes
      if (!response.ok) {
        throw new Error("Request failed");
      }

      const data = await response.json();
      setResults(data);
    } catch (error) {
      if (error.name !== "AbortError") {
        console.error(error);
      }
    }
  }

  if (query.trim()) {
    search();
  }

  return () => controller.abort();
}, [query]);

I'm curious how other developers handle this in production.

  1. Is debouncing + AbortController enough for most search interfaces?

  2. Do you also use request IDs to ignore stale responses?

  3. How do you handle loading and error states when requests overlap?

Interested in hearing what patterns have worked well in real projects.


r/Frontend • • 9d ago

Computing with CSS Layout

Thumbnail
noscript.ing
27 Upvotes

r/Frontend • • 9d ago

Exporting a TanStack Table to Excel with grouped rows as real outlines

Thumbnail
rowpine.com
3 Upvotes
RowPine exports a grouped TanStack table to Excel and get a flat sheet with the totals typed in as numbers. Edit a cell and nothing adds up anymore.

Groups become Excel outline levels you can collapse, totals are SUBTOTAL formulas, and filters, sort and hidden columns carry over. PDF and CSV come out of the same table. 

r/Frontend • • 11d ago

Recreating Apple’s genie effect on the web: how the window bends into a funnel and drains into the dock

Thumbnail
uicraft.in
12 Upvotes

r/Frontend • • 11d ago

Agentic Coding: Bet on the Primitives

Thumbnail
robinwieruch.de
11 Upvotes

r/Frontend • • 10d ago

I just shipped Forge UI, an open-source React component library

0 Upvotes

I’ve been working on Forge UI and just shipped its first release. It’s a collection of React components for things like data tables, command palettes, forms, file uploads, date pickers, and more, with a focus on TypeScript and accessibility.

It’s an early project, so feedback on the components and docs would be appreciated.

Repo: https://github.com/BZDevelopments/Forge-UI
Docs: https://bzdevelopments.github.io/Forge-UI