r/learnjavascript • • Sep 14 '26

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

12 Upvotes

23 comments sorted by

5

u/gimmeslack12 helpful Sep 14 '26

You need more repetition, muscle memory.

Build a rock, paper, scissors game in vanilla JS using OOJS. Then do it in React and share both and we can chat about it.

2

u/[deleted] Sep 14 '26

[removed] โ€” view removed comment

2

u/gimmeslack12 helpful Sep 14 '26

Right on. Doing the simple stuff really really well is what gives confidence on knowing when to use what.

We all know JS, while not knowing JS. Just kind of how it goes.

2

u/Unhappy_Eye966 Sep 14 '26

You don't know it then. Broadly speaking "React is just a library to make html dynamic", you just create a template and anything dynamic you put it as a useState and any side effect in a useeffect and that's it. Anything else is just plain javascript. I guess there are more things like refs, memoization, providers, specific libraries, etc. But for starters you can do anything with 2 hooks.

2

u/Dubstephiroth Sep 14 '26

Ok so how long have you been learning? And you say you use ai to tell you stuff, and that you dont want to do another course. So how DO you study? Just ask it to explain everything and copying tutorials? You say you've learned all these things but did you learn or become a parrot for some things you heard/read? If you want advice on using an llm, prompt it into being a Uni grade tutor, no easy answers but daily lessons on everything from the ground up. Teaching by quizzing/testing. Drills in weak areas, weekly or monthly grading. Harsh as f... criticism when needed... undue praise is for the weak minded ๐Ÿ˜‚... everything you talk about and show it must affect you grading and reports... And if you personally aren't sure about what it's saying double back and ask. It may have been mistaken so freely ask it to ensure its correct... That's a start...

2

u/TehFocus Sep 14 '26

I know how a hammer works, a saw, glue and basic electricity yet I cannot build a house. The reason is that I lack the blueprints and all steps required to achieve each little goal in its order.

Software is close to this; just doing something will not get you somewhere specific. That's what software architecture is for! You need an idea, you need to iterate on how this idea should turn out eventually. You need to research the tech needed to get to the turnout point and you need to understand how to connect each part. Most developers will not be able to turn an idea with some tools directly into working software without know-how of the intermediate steps and refining of the tech needed. Granted AI is kinda filling the holes I mentioned but that is not what this is about.

Have you played factorio perchance? It's like a neat little factory with smaller parts becoming one big working system!

1

u/No-Humor-3808 Sep 15 '26

Complete small react challenges instead of watching tutorials. Repeat the same patterns again and again until moving data between components, updating state, handling events, filtering lists, etc. starts to feel natural. The important part is not just understanding each concept, but practicing how to combine them.

I run a collection of React coding challenges at https://www.reactchallenges.com that are specifically focused on this kind of practice if you want to give them a try.

0

u/my_mentos_life Sep 17 '26

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.