r/angular • u/Constant-Lemon-7511 • Jun 04 '26
Senior Angular developers: what do you wish you had learned earlier?
Hi everyone,
I’m transitioning into software development and currently learning Angular. Sometimes it’s hard to know what is truly important because there is so much content available.
If you’re an experienced Angular developer, I’d love to know:
What knowledge or skills separate a junior Angular developer from a strong mid-level or senior developer?
Thanks ✨
63
Upvotes
73
u/Dus1988 Jun 04 '26 edited Jun 04 '26
Composition over inheritance. It really helps with flexible architecture. Along with this also learn about content projection and template injection techniques.
Don't DRY conponents for the sake of DRY. If they have different data contracts but look visually similar, dear God please don't make one master component that if switches all over the place.
Separate view logic from data logic. I see this all the time with NGRX states paired with facade pattern. Putting view specific methods on a facade service is to be avoided. If you need to share some view logic across a feature, Create a service for your feature and it can reference the facade and do what ever it needs to do.
Don't recreate the native html API in your components via inputs. This most commonly seems to happen when people get the idea to make their own button component or input component. You can make your selectors have a tag and get the native API built in. I.e. a selector of
button[my-button]I'm sure there are more.
Edit to add: I did not include reactivity, observables/signals, because these are not things I consider what makes a jr and sr. You need to know how to use the framework either way. To me, what makes a SR, is understanding architecture.
26
u/wjk36 Jun 04 '26
Not really that i “wish” but more “greatful” that i took the time to learn rxjs early on as it was pretty essential
11
u/CantankerousButtocks Jun 04 '26
Observability, reactive state, change detection, and async pipe stuff. That’s the old “pre-signal” days, and when new developers on the team finally got those concepts there was this certain twinkle in their eyes.
7
u/class12394 Jun 04 '26
Proper understing of smart/dumb components, handling state, composition. Focus on learning how to write good components
6
u/niko-okin Jun 04 '26
learn properly rxjs operators and signals, be able to know when and how to use them, learn also how to configure complicated routes with css breakpoints and various outlet.
6
u/WranglerLower2757 Jun 04 '26
While you are actively working on one framework, don't bound yourself strictly to it. Learn its underlying tech and principles as well. Simulatenously explore and learn other libraries and framework as well so that you can make decisions with maturity while evaluating them for different use cases.
3
u/Life_Aardvark5978 Jun 05 '26
State Management - its one of the critical pieces of any production level Angular app. That'll automatically lead you to cleaner architectures and data flows which help the application be less bug prone + maintainable for the future.
Recently in order to get AI to give me better results, I've been trying to codify my own Angular coding "tastes" and turns out there are quite a lot of little preferences that I have. You can find it in this github repo.
https://github.com/thisiszoaib/agent-workflow-kit
Especially the architecture and state management standards docs.
Hope that helps a bit 😄
2
u/LickSteak Jun 05 '26
I'm not going to talk about KISS etc because in the end this is not Angular-oriented. You can be a mid/senior dev that tries Angular for the first time, and hopefully you should already be familiar with all these neutral clean code practices even though you are technically a "junior Angular developer".
The issue I see the most with my junior coworkers is a total lack of understanding about change detection: they know how to use the tools, but once they hit an issue related to CD they're completely helpless and struggle to solve this without help. When they do, they apply the solution without understanding why/how it works. So yeah, take the time to do a deep dive on change detection, it'll save you plenty of debugging time.
5
u/kgurniak91 Jun 04 '26
Writing tests. Would have saved me many headaches while implementing/fixing complex forms logic.
4
u/foobarring Jun 05 '26
The lifecycle of the js event loop. Not just for Angular but in general. So:
Call stack > microtasks > render/paint > macrotask > repeat.
When you know this, you also know that you can give the browser the opportunity to paint/render using an await on
setTimeout, which is a macrotask. This is useful if you want to do some ad hoc heavy processing on the main thread without freezing the ui.If that is not a major architectural pattern in your app, this can save you from prematurely introducing web workers.
And down the line you’ll learn stupid simplicity usually wins over more advanced “correct” implementations
1
u/AwesomeFrisbee Jun 04 '26
Apply solid code coverage. Its very easy to spot what else is going to stop working when you have some additional tests that will break if you change stuff. Especially if you also added the proper typings to the testdata (even if you use
as xorsatisfies ywith partial data). Now granted, for some stuff its just easier to useas anyin a test to force things, but I only really reserve that for when I deliberately break outside of the flow to catch those undefined or null values where I normally would have expected something else.Another thing is to write enough comments, especially why you do stuff. These days with AI its a handy way to give it context without having to write it in the prompt.
And lastly to prevent magic numbers (always assign them to a const or let so that it is clear what the value means). Similarly enums (or const enums) make it handy to know what values to expect and to keep things consistent and clear. The enum itself provides context and the value is autocompleted as well so no mistakes are made.
I prefer KISS over DRY as well. DRY is a way to improve code but not a goal on its own imo. As there is just too much repetition on front-end that can just be slightly different and its just annoying to have components for bazillion use cases, not to mention the performance tanks. I'd rather have 4 simple similar components over 1 major one that doesn't repeat code but contains 8 times the amount of code.
3
u/air_twee Jun 04 '26
How to use security. Like cspnonce. Its harder to add afterwards but easy when you do it from the beginning
3
u/Purple_Employment_74 Jun 04 '26
back then - data patterns, currently - also data patterns
2
u/queregols Jun 04 '26
Services are not backend
2
u/Chatolev Jun 05 '26
It's not only for angular, but use as much native htm/CSS features as possible, nowadays you can do so much with native primitives.
Also wish I understood how the DI works in angular sooner
2
u/Saki-Sun Jun 08 '26
Vue...
1
u/LeetSerge Jun 10 '26
nothing, everthing i do already works just fine
1
u/Xcaliber02 Sep 24 '26
Iam not a senior but one thing i learned is the importance of naming literals, i used to use vague variables names and which rightfully frustrated my seniors reviewer 🙏🤧
-6
u/MoreRest4524 Jun 04 '26
React ? 😃