[better] | Decoded Frontend Angular Interview Hacking
Do not use TestBed for simple presentational components. Instantiate the class directly (e.g., const component = new MyComponent(); ) to execute lightning-fast unit tests without DOM compilation overhead.
Expect to be grilled on Smart (Container) vs. Dumb (Presentational) component architecture.
Explain that mutating an object property will not trigger an update under OnPush because the object reference remains the same. You must enforce immutability (e.g., using the spread operator or libraries like Immer) to make OnPush work correctly. Signals vs. RxJS decoded frontend angular interview hacking
You will likely be asked to justify your choice of state management. Be prepared to compare the heavyweights:
Senior developers must protect the application from unauthorized access and malicious exploits. Do not use TestBed for simple presentational components
Many candidates fail because they treat testing as an afterthought. Flip the script by bringing up testing strategies before the interviewer asks.
State clearly that they are complementary. Use RxJS for the "asynchronous plumbing" and interop them into Signals using toSignal() for clean template rendering. 🌐 Architectural Patterns and State Management Dumb (Presentational) component architecture
Show competence in using HttpTestingController to mock backend responses rather than making actual network calls during unit tests.