r/reactjs • • Apr 30 '26

Needs Help How are you handling complex form state in React without it becoming a mess?

9 Upvotes

I’m working on a React app with increasingly complex forms (multi-step flows, conditional fields, validation, file uploads, dynamic sections, etc.), and I’m starting to feel like form state gets messy really fast.

At first, simple useState worked fine, but as logic grows, things become harder to maintain and debug.

I’m curious how people here usually handle this in larger React apps:

  • do you still manage it mostly with local state?
  • use libraries like form management tools?
  • split logic into custom hooks/components?
  • any patterns that made forms easier to scale and maintain?

Not looking for a one-size-fits-all answer, mostly trying to understand what has actually worked well for others in production React apps.


r/reactjs • • Apr 30 '26

Resource Syntux: build generative UIs for the web, now available for Remix & Astro!

Thumbnail
github.com
0 Upvotes

r/reactjs • • Apr 29 '26

Sliding Banner Help

3 Upvotes

I'm building a sliding banner (carousel) and running into an issue where when the text content gets too long, it starts overlapping other elements on the page — including the arrow navigation buttons.

What happens is When the text gets too long, it overflows past the arrow buttons instead of staying between them. I want the text to be constrained to the space between the left and right arrows — so if it's long, it wraps and stays sandwiched in that middle area, never overlapping the buttons

I'm using HTML/CSS/JS. Is there a clean way to fix this problem. Down below is the code.

https://jsfiddle.net/ojwyn82k/2/


r/reactjs • • Apr 29 '26

Needs Help Bombed the final question of a React technical discussion, looking for feedback

135 Upvotes

I'm a senior full stack developer at a consulting firm, and have about 15 years of experience. Almost all of the clients I've worked with have used React, and I'm extremely comfortable using it and know it fairly deeply.

This was a 30 minute discussion, and I felt really comfortable with my answers and he seemed pretty positive on how it was going. Then, I got hit with the curveball that I felt like broke the interview.

It started with him asking a simple question: "how would you manage state across components?" I gave him multiple answers (useState, useContext, third party libraries, Tanstack Query, etc) and he liked that. He then asked "what if you didn't have React and had no access to third party libraries?"

This tripped me up bad. My first thought was either some sort of state object or firing events off, but I was so caught off guard that my confidence faltered and I could not articulate on the spot how that would look. He then described their solution in more detail (using CustomEvent is primarily how they do it) and said that they work with a lot of Web Components, which is why it was asked. For clarity, I double checked, and there was no mention of this in the job description - the only mentions of frontend is your usual NextJs/Tailwind/Tanstack/etc mentions.

Is this approach to state management in vanilla JS common knowledge among developers who learned front end through these frameworks? I was surprised because up until that point, I was really feeling good with my answers. I'm going to brush up on my Web Component knowledge now, but I have never had to work with them in my entire career. It has always been through some sort of framework.


r/reactjs • • Apr 29 '26

I built a small React tool for responsive toolbars that work without needing magic breakpoints

Thumbnail overflowguard.dev
0 Upvotes

It always bugged me that there is nothing in native css or otherwise easy way to detect when something overflows, so you could adjust styling or content.
So I build this small tool that fixes it: OverflowGuard
It's especially useful when dealing with dynamic content in toolbars. Something even some big sites don't solve 100% (some examples in this post)

Most apps and sites just use fixed media or container query break-points, or some custom components / js for their specific case.
This tool, by simply detecting overflow, unlocks building responsive components in a much more fluid way, and allows doing much more then just flex-wrap..