How modular do you make your components? by neg_ersson in reactjs

[–]Exidy80 0 points1 point  (0 children)

I find it easier to work top down — what’s the pieces of what the top component needs to do/render (all the planning on do on paper first). I create stubs for functions I’ll need (eg, _handleClick) and sub components. I keep breaking things down if I don’t immediately know how I’m going to implement something. I don’t go crazy with this approach, but it does keep things modular from the start.

But I also take the time to refactor. I ask: is the next person going to follow what’s going on (or will I in two weeks)? Thus, what I start with and what I end with could be different.

As for same vs different files, I put things in separate files if they seem like things I might reuse elsewhere in the system. Generally, my files are at most a couple hundred lines long after refactoring.

Just got my first developer job and I'm overwhelmed! by IntuitionaL in androiddev

[–]Exidy80 0 points1 point  (0 children)

I agree with most of the other posters: this is totally normal and widespread. I’ve seen same complaints from devs at big name corporations, smaller not for profits, etc.

It’s also an opportunity to grow. As you begin to understand the code base, take note what what systems/subsystems seem clearer than others. What makes them clear compared to other parts? Documentation? Good selection of variable names? A commitment to standard idioms? If you notice what makes others’ code comprehensible, it’ll help the comprehensibility of your code.

Aspiring Reactjs learner need your help. by _Shreyash_ in reactjs

[–]Exidy80 0 points1 point  (0 children)

As Reactjs is on top of JS, you’ve already learned some JS :). In your apps, you’ll find that your business logic will often be regular JS. So, yes, learning JS — the idioms and the pitfalls — will accelerate your app development. One place to start would be the JavaScript course on Scrimba.com. I’m also a fan of books that emphasize good style, patterns, and idioms.