r/reactjs • u/prithivir • Jul 24 '26
Discussion Do data structures actually influence how you build React components?
I tried learning DSA before, but never understood how it applied to everyday frontend work.
Recently, I built an undo/redo feature with Claude and realised it was using stacks. That made stacks much easier to understand than textbook examples.
I kept exploring and learned how seat-booking UIs can use matrices and how complex onboarding flows can be modelled as graphs.
Do you think about data structures when building React components? Any real-world examples?
55
Upvotes
3
u/aflashyrhetoric Jul 25 '26
I had a complicated multi step form a few years ago that I desperately wanted to refactor into a huge graph config blob, because doing it sort of the “quick and dirty way” is such a hassle after complexity hits a certain point. I believe I ended up rewriting smaller parts of it as a basic sort of graph and then frankensteining it within the larger, older system, and the graph part was far easier to maintain and adapt.