All fields

“Hooks” in Information Technology

147 questions across 8 technologies.

Information Technology

147 questions in 8 technologies

#QuestionTechnologyTopicLevel
1What are hooks in React and why were they introduced? React › HooksReactHooksBeginner
2What are the rules of hooks, and why do they exist? React › HooksReactHooksAdvanced
3What are resource hooks in ArgoCD? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksBeginner
4Which resource types are commonly used as hooks? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksBeginner
5What resource kinds make good hooks and why Jobs specifically? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksBeginner
6How do sync waves and hooks interact? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksIntermediate
7Can hooks use sync waves to order among themselves? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksIntermediate
8How do you notify an external system after a successful deployment using hooks? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksIntermediate
9What are the rules you must follow when writing and using hooks, including custom hooks? React › Custom HooksReactCustom HooksIntermediate
10How do hooks differ from plain resources with sync waves, and when do you choose each? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksAdvanced
11How do you coordinate hooks across multiple Applications (e.g., App of Apps)? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksAdvanced
12What are pitfalls of overusing hooks and waves? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksAdvanced
13What are lifecycle hooks in Angular and why would you use them? Angular › Lifecycle HooksAngularLifecycle HooksBeginner
14What is the correct order in which Angular calls the main lifecycle hooks during a component's life? Angular › Lifecycle HooksAngularLifecycle HooksAdvanced
15What is the resource hooks vs health relationship during a sync? ArgoCD › Sync & HealthArgoCDSync & HealthIntermediate
16What does componentDidMount do in a class component and what is its equivalent using hooks? React › Class Components & Legacy Lifecycle MethodsReactClass Components & Legacy Lifecycle MethodsIntermediate
17What are the downsides of higher order components that led many developers to prefer custom hooks instead? React › Higher-Order Components (HOCs)ReactHigher-Order Components (HOCs)Advanced
18Why can't server components use hooks like useState or useEffect? Next.js › Server ComponentsNext.jsServer ComponentsBeginner
19What are WordPress hooks, specifically actions and filters, and how do they let plugins and themes modify or extend WordPress's default behavior? PHP › WordPress Plugin & Theme DevelopmentPHPWordPress Plugin & Theme DevelopmentBeginner
20What role do webhooks play in GitOps with ArgoCD? ArgoCD › GitOps PrinciplesArgoCDGitOps PrinciplesIntermediate
21Why can you not use React hooks like useState inside the custom Document component? Next.js › Custom App & Document in Pages RouterNext.jsCustom App & Document in Pages RouterIntermediate
22How do CodeDeploy lifecycle hooks defined in an appspec file control the deployment process? AWS › AWS CodePipeline, CodeBuild & CodeDeploy (CI/CD)AWSAWS CodePipeline, CodeBuild & CodeDeploy (CI/CD)Intermediate
23What is IHostedLifecycleService, and how does it provide more granular hooks than IHostedService's StartAsync/StopAsync? .NET › Background Services.NETBackground ServicesAdvanced
24What does the node:perf_hooks module provide, and how would you use it to measure precise execution time of a code block? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesAdvanced
25How would you handle email delivery webhooks (bounces, complaints, opens) sent from a provider like SendGrid back to a Node.js application? Node.js › Email & NotificationsNode.jsEmail & NotificationsAdvanced
26How would you use async_hooks (the lower-level predecessor to AsyncLocalStorage) to trace the lifecycle of asynchronous resources in Node.js? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOAdvanced
27How would you use Git hooks (like a pre-commit hook via Husky) to enforce code quality checks before code is committed in a Node.js project? Node.js › Git & Project ManagementNode.jsGit & Project ManagementAdvanced
28How do lifecycle hooks in Auto Scaling Groups let you customize instance launch and termination behavior? AWS › Auto Scaling GroupsAWSAuto Scaling GroupsAdvanced
29What does the useState hook do, and how do you use it? React › HooksReactHooksBeginner
30What is the useReducer hook and when is it a better choice than useState? React › HooksReactHooksIntermediate
31What is the useMemo hook and how does it help with performance? React › HooksReactHooksIntermediate
32What are sync waves in ArgoCD? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksBeginner
33What is the default sync wave and how are negative waves used? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksBeginner
34How do you annotate a resource with a sync wave? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksBeginner
35What are the hook deletion policy options? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksBeginner
36What is the Sync phase (as opposed to PreSync/PostSync)? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksBeginner
37What is a simple real world example of when useTransition would make an app feel faster? React › Concurrent Hooks (useTransition, useDeferredValue & useLayoutEffect)ReactConcurrent Hooks (useTransition, useDeferredValue & useLayoutEffect)Beginner
38What is a custom hook in React and why would you create one? React › Custom HooksReactCustom HooksBeginner
39How is a custom hook different from a regular helper function? React › Custom HooksReactCustom HooksBeginner
40What are the hook phases and when does each run? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksIntermediate
41What are hook deletion policies? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksIntermediate
42How do you run a database migration safely before deploying a new version? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksIntermediate
43What is a Skip hook and when is it used? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksIntermediate
44How are hook resources named and prevented from clashing across syncs? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksIntermediate
45How long does ArgoCD wait between sync waves? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksIntermediate
46What is a PreSync hook typically used for? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksIntermediate
47What is a PostSync hook typically used for? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksIntermediate
48How do you seed initial data on first deployment only? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksIntermediate
49How do you order a multi-tier application deployment with waves? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksAdvanced
50How do you run post-deployment smoke tests and fail the sync if they fail? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksAdvanced
51What is a SyncFail hook and how is it used? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksAdvanced
52How do you retry a failed hook Job? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksAdvanced
53How do sync waves handle deletion order during pruning? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksAdvanced
54How do you ensure a hook runs on every sync versus only on change? ArgoCD › Sync Waves & HooksArgoCDSync Waves & HooksAdvanced
55How does useDeferredValue help improve performance when rendering a large list based on user input? React › Concurrent Hooks (useTransition, useDeferredValue & useLayoutEffect)ReactConcurrent Hooks (useTransition, useDeferredValue & useLayoutEffect)Advanced
56Why is the constructor generally not the right place to fetch data or perform complex setup in an Angular component? Angular › Lifecycle HooksAngularLifecycle HooksBeginner
57What problem does useTransition solve in a React app? React › Concurrent Hooks (useTransition, useDeferredValue & useLayoutEffect)ReactConcurrent Hooks (useTransition, useDeferredValue & useLayoutEffect)Intermediate
58What is useLayoutEffect and how is it different from the regular useEffect hook? React › Concurrent Hooks (useTransition, useDeferredValue & useLayoutEffect)ReactConcurrent Hooks (useTransition, useDeferredValue & useLayoutEffect)Intermediate
59How would you write a custom hook to fetch data from an API and share that logic across components? React › Custom HooksReactCustom HooksIntermediate
60What does ngOnDestroy do, and why is it important for cleaning up resources like subscriptions? Angular › Lifecycle HooksAngularLifecycle HooksIntermediate
61What is the difference between ngOnChanges and ngOnInit, and when does each run? Angular › Lifecycle HooksAngularLifecycle HooksIntermediate
62When should you choose useTransition over useDeferredValue, given they solve a similar kind of problem? React › Concurrent Hooks (useTransition, useDeferredValue & useLayoutEffect)ReactConcurrent Hooks (useTransition, useDeferredValue & useLayoutEffect)Advanced
63How would you build a custom hook that debounces a fast changing value, such as text typed into a search box? React › Custom HooksReactCustom HooksAdvanced
64What is a sync in ArgoCD? ArgoCD › Sync & HealthArgoCDSync & HealthBeginner
65What are the health statuses ArgoCD reports? ArgoCD › Sync & HealthArgoCDSync & HealthBeginner
66What is the Degraded health status? ArgoCD › Sync & HealthArgoCDSync & HealthBeginner
67How would you animate a button so it grows slightly when a user hovers over it? React › Animation in React (Framer Motion & React Spring)ReactAnimation in React (Framer Motion & React Spring)Beginner
68What is a class component in React and how does it differ from a function component? React › Class Components & Legacy Lifecycle MethodsReactClass Components & Legacy Lifecycle MethodsBeginner
69How do you render a list of items in React using the map function? React › Conditional Rendering & Lists (Keys)ReactConditional Rendering & Lists (Keys)Beginner
70What problem does the Context API solve in React? React › Context APIReactContext APIBeginner
71What problem do libraries like React Query and SWR solve compared to fetching data with plain useEffect? React › Data Fetching (React Query & SWR)ReactData Fetching (React Query & SWR)Beginner
72Why is it usually better to use a data fetching library instead of writing your own fetch logic in every component? React › Data Fetching (React Query & SWR)ReactData Fetching (React Query & SWR)Beginner
73What is the useEffect hook used for in React? React › Effects & LifecycleReactEffects & LifecycleBeginner
74What is the difference between useEffect and code that runs directly during rendering? React › Effects & LifecycleReactEffects & LifecycleBeginner
75What is internationalization in a React app and why is it important? React › Internationalization (i18n) in ReactReactInternationalization (i18n) in ReactBeginner
76How would you let a user switch the language of an app using a simple dropdown menu? React › Internationalization (i18n) in ReactReactInternationalization (i18n) in ReactBeginner
77What does React.memo do and how does it help performance? React › Performance (memo/useMemo)ReactPerformance (memo/useMemo)Beginner
78What is a simple real world example of when useMemo actually helps a React app? React › Performance (memo/useMemo)ReactPerformance (memo/useMemo)Beginner
79What is the difference between props and state in React? React › Props & StateReactProps & StateBeginner
80What is the difference between a ref created with useRef and one created with createRef? React › Refs, useRef & forwardRefReactRefs, useRef & forwardRefBeginner
81What is a simple real world example of the render props pattern being useful? React › Render Props PatternReactRender Props PatternBeginner
82What is a Client Component and when do you need one instead of a Server Component? React › Server ComponentsReactServer ComponentsBeginner
83What is Redux and what problem does it solve for larger React apps? React › State Management Libraries (Redux, Zustand & Recoil)ReactState Management Libraries (Redux, Zustand & Recoil)Beginner
84Should you leave Strict Mode enabled in your app permanently, or only use it temporarily? React › Strict Mode & Concurrent FeaturesReactStrict Mode & Concurrent FeaturesBeginner
85What is React Testing Library and how does its approach to testing differ from testing internal implementation details? React › TestingReactTestingBeginner
86What is the difference between a unit test and a component test in a React app? React › TestingReactTestingBeginner
87When should you choose useReducer over useState for managing a component's state? React › useReducer & Complex State LogicReactuseReducer & Complex State LogicBeginner
88Why does the virtual DOM make React apps feel fast even when data changes frequently? React › Virtual DOM & ReconciliationReactVirtual DOM & ReconciliationBeginner
89What is the difference between using a resolver and simply fetching data inside a component's ngOnInit method? Angular › Router Guards & ResolversAngularRouter Guards & ResolversBeginner
90What is the difference between ViewChild and ContentChild in Angular? Angular › Template Reference Variables & ViewChildAngularTemplate Reference Variables & ViewChildBeginner
91What does the prune option do in a sync policy? ArgoCD › ApplicationsArgoCDApplicationsIntermediate
92How does ArgoCD track which resources belong to an Application? ArgoCD › ApplicationsArgoCDApplicationsIntermediate
93How do you handle resources that ArgoCD should create but not manage/delete? ArgoCD › ApplicationsArgoCDApplicationsIntermediate
94How does ArgoCD determine the health of a resource? ArgoCD › Sync & HealthArgoCDSync & HealthIntermediate
95What are sync options and give common examples? ArgoCD › Sync & HealthArgoCDSync & HealthIntermediate
96What is a selective sync and when is it useful? ArgoCD › Sync & HealthArgoCDSync & HealthIntermediate
97How do you configure automated sync with retry and backoff? ArgoCD › Sync & HealthArgoCDSync & HealthIntermediate
98What happens during a sync when a resource apply fails? ArgoCD › Sync & HealthArgoCDSync & HealthIntermediate
99How do you order child application deployment in App of Apps? ArgoCD › App of AppsArgoCDApp of AppsIntermediate
100How does ArgoCD assess Deployment health specifically? ArgoCD › Sync & HealthArgoCDSync & HealthIntermediate
101What is the Suspended health status? ArgoCD › Sync & HealthArgoCDSync & HealthIntermediate
102How do you make a custom React component keyboard accessible? React › Accessibility (a11y) in ReactReactAccessibility (a11y) in ReactIntermediate
103How does React Spring differ from Framer Motion in the way it creates animations? React › Animation in React (Framer Motion & React Spring)ReactAnimation in React (Framer Motion & React Spring)Intermediate
104Why can only class components be used as error boundaries in React? React › Class Components & Legacy Lifecycle MethodsReactClass Components & Legacy Lifecycle MethodsIntermediate
105How do you create and use a custom Context in React step by step? React › Context APIReactContext APIIntermediate
106How would you build a custom hook to make using a specific Context simpler and safer? React › Context APIReactContext APIIntermediate
107What is the container and presentational component pattern in React? React › Design Patterns in ReactReactDesign Patterns in ReactIntermediate
108What does the dependency array in useEffect actually control? React › Effects & LifecycleReactEffects & LifecycleIntermediate
109How do you clean up an effect in React, and why is it important? React › Effects & LifecycleReactEffects & LifecycleIntermediate
110What is a higher order component in React? React › Higher-Order Components (HOCs)ReactHigher-Order Components (HOCs)Intermediate
111How would you use a higher order component to add authentication protection to a page? React › Higher-Order Components (HOCs)ReactHigher-Order Components (HOCs)Intermediate
112What is the useCallback hook and how is it different from useMemo? React › Performance (memo/useMemo)ReactPerformance (memo/useMemo)Intermediate
113Why is state considered the single source of truth for data that changes in a React component? React › Props & StateReactProps & StateIntermediate
114How do you use the Components tab in React DevTools to inspect a component's current state? React › React DevTools & DebuggingReactReact DevTools & DebuggingIntermediate
115How do you debug a component that is not updating even though its state changed? React › React DevTools & DebuggingReactReact DevTools & DebuggingIntermediate
116How is useRef different from useState when it comes to storing a value? React › Refs, useRef & forwardRefReactRefs, useRef & forwardRefIntermediate
117How would you use a ref to keep track of a component's previous prop value? React › Refs, useRef & forwardRefReactRefs, useRef & forwardRefIntermediate
118What is the render props pattern in React? React › Render Props PatternReactRender Props PatternIntermediate
119What is a common naming alternative to render props, using children as a function instead? React › Render Props PatternReactRender Props PatternIntermediate
120What is a downside of the render props pattern that developers should be aware of? React › Render Props PatternReactRender Props PatternIntermediate
121How does Zustand offer a simpler alternative to Redux for managing global state? React › State Management Libraries (Redux, Zustand & Recoil)ReactState Management Libraries (Redux, Zustand & Recoil)Intermediate
122How do middleware, such as Redux Thunk, help handle asynchronous operations like API calls in Redux? React › State Management Libraries (Redux, Zustand & Recoil)ReactState Management Libraries (Redux, Zustand & Recoil)Intermediate
123Why does Strict Mode call component functions and certain effects twice during development? React › Strict Mode & Concurrent FeaturesReactStrict Mode & Concurrent FeaturesIntermediate
124What is automatic batching in React, and how does it improve performance? React › Strict Mode & Concurrent FeaturesReactStrict Mode & Concurrent FeaturesIntermediate
125How do you properly type the useState hook in a React component using TypeScript? React › TypeScript with ReactReactTypeScript with ReactIntermediate
126What is the basic structure of a reducer function used with the useReducer hook? React › useReducer & Complex State LogicReactuseReducer & Complex State LogicIntermediate
127How would you check whether any content was actually projected into a component using ng-content? Angular › Content Projection (ng-content)AngularContent Projection (ng-content)Intermediate
128How does the async pipe simplify working with observables directly in an Angular template? Angular › Pipes (Built-in & Custom)AngularPipes (Built-in & Custom)Intermediate
129Why is it important to unsubscribe from an RxJS observable, and what are common ways to do this correctly in Angular? Angular › RxJS & ObservablesAngularRxJS & ObservablesIntermediate
130What does the ViewChild decorator do, and how would you use it to access a child component from a parent's TypeScript code? Angular › Template Reference Variables & ViewChildAngularTemplate Reference Variables & ViewChildIntermediate
131How does the newer signal based viewChild function differ from the traditional ViewChild decorator? Angular › Template Reference Variables & ViewChildAngularTemplate Reference Variables & ViewChildIntermediate
132What are the trade-offs and limitations of GitOps? ArgoCD › GitOps PrinciplesArgoCDGitOps PrinciplesAdvanced
133How do you troubleshoot an Application stuck in Progressing or OutOfSync? ArgoCD › ApplicationsArgoCDApplicationsAdvanced
134How does ServerSideApply help with large or conflicting resources? ArgoCD › Sync & HealthArgoCDSync & HealthAdvanced
135How do you handle CRDs and their custom resources syncing in the right order? ArgoCD › Sync & HealthArgoCDSync & HealthAdvanced
136How can you customize health checks for third-party or custom resources? ArgoCD › Sync & HealthArgoCDSync & HealthAdvanced
137How do you implement progressive delivery (canary/blue-green) with ArgoCD? ArgoCD › Sync & HealthArgoCDSync & HealthAdvanced
138How do you debug why an app never reaches Healthy after a successful sync? ArgoCD › Sync & HealthArgoCDSync & HealthAdvanced
139How do you integrate Argo Rollouts analysis into sync health? ArgoCD › Sync & HealthArgoCDSync & HealthAdvanced
140How do you use sync waves on child applications for ordered platform bootstrap? ArgoCD › App of AppsArgoCDApp of AppsAdvanced
141How would you build a reusable error boundary that lets the user retry after an error occurs? React › Error BoundariesReactError BoundariesAdvanced
142How does React Hook Form simplify building forms compared to managing every field with useState manually? React › Forms: Controlled & Uncontrolled ComponentsReactForms: Controlled & Uncontrolled ComponentsAdvanced
143How would you use the React Profiler to find which components are causing performance problems? React › Performance (memo/useMemo)ReactPerformance (memo/useMemo)Advanced
144How would you rewrite a render props component as a custom hook instead? React › Render Props PatternReactRender Props PatternAdvanced
145How would you protect certain routes so only logged in users can access them? React › RoutingReactRoutingAdvanced
146How does the useFormStatus hook help show loading feedback while a server action is running? React › Server Actions & Data MutationsReactServer Actions & Data MutationsAdvanced
147What are concurrent features in React, and how do they relate to Strict Mode? React › Strict Mode & Concurrent FeaturesReactStrict Mode & Concurrent FeaturesAdvanced