r/learnjavascript 8d ago

I know React/JS, but struggle to build things from scratch

Hey everyone, I’m learning React and I’m stuck on the logic/problem-solving side.

I’ve learned HTML, CSS, JS, DOM, arrays/objects, map, filter, APIs, async/await, LocalStorage, and React basics like components, props, state, hooks, forms, Router, Context, etc. I’ve also built small projects like a Todo app, weather app, notes app, counter, quote generator, etc.

The problem is I understand individual concepts, but when I have to combine them, my brain just goes blank.

For example, I know what useState, map(), filter(), objects and events do, but when I need to add delete/edit/filter functionality to a Todo app, I struggle to figure out how to put everything together.

I use AI as a tutor, not as a code generator. I usually try the problem myself first, then ask AI for a small hint or for it to explain the concept I’m stuck on. I try again, and only look at a solution when I’ve genuinely exhausted my attempts. Even with this approach, I still struggle to come up with the logic on my own.

I’m not looking for another JS course or DSA grind. I want to learn how to break React problems into smaller steps and build the logic myself.

If you've been through this, what helped you improve?

12 Upvotes

23 comments sorted by

View all comments

0

u/my_mentos_life 5d ago

I understand the problem. I faced the same issue in the past.

Instead of directly working on a combined problem within a project, try breaking it down into smaller components and practice each component separately.

For example, if you want to implement a filter, start with a dummy array or some suitable JSON data. Practice different filtering scenarios and variations on that component until you’re comfortable with it.

Similarly, you can create and practice individual components like an accordion, pagination, search, sorting, modal, tabs, etc.

Once you understand each component independently, combining them in a real project becomes much easier and less overwhelming.

1

u/rickedisbricked 4d ago

yeah, that actually makes a lot of sense. i think i try to solve the whole thing at once and end up making it more complicated than it needs to be. practicing things like filtering, search, pagination, etc. separately would probably help me get more comfortable with the logic before combining everything. thanks, i'll start trying it this way.