Skip to content

Commit df143b4

Browse files
refactor(core): remove unused LifecycleHooksFeature (#59678)
LifecycleHooksFeature seems to be unused and can be deleted. PR Close #59678
1 parent cfa9fc2 commit df143b4

File tree

3 files changed

+0
-22
lines changed

3 files changed

+0
-22
lines changed

packages/core/src/core_render3_private_export.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ export {
4848
DirectiveType as ɵDirectiveType,
4949
getDirectives as ɵgetDirectives,
5050
getHostElement as ɵgetHostElement,
51-
LifecycleHooksFeature as ɵLifecycleHooksFeature,
5251
NgModuleFactory as ɵNgModuleFactory,
5352
NgModuleRef as ɵRender3NgModuleRef,
5453
NgModuleType as ɵNgModuleType,

packages/core/src/render3/component_ref.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -521,22 +521,3 @@ function projectNodes(
521521
projection.push(nodesforSlot != null && nodesforSlot.length ? Array.from(nodesforSlot) : null);
522522
}
523523
}
524-
525-
/**
526-
* Used to enable lifecycle hooks on the root component.
527-
*
528-
* Include this feature when calling `renderComponent` if the root component
529-
* you are rendering has lifecycle hooks defined. Otherwise, the hooks won't
530-
* be called properly.
531-
*
532-
* Example:
533-
*
534-
* ```ts
535-
* renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});
536-
* ```
537-
*/
538-
export function LifecycleHooksFeature(): void {
539-
const tNode = getCurrentTNode()!;
540-
ngDevMode && assertDefined(tNode, 'TNode is required');
541-
registerPostOrderHooks(getLView()[TVIEW], tNode);
542-
}

packages/core/src/render3/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* Use of this source code is governed by an MIT-style license that can be
66
* found in the LICENSE file at https://angular.dev/license
77
*/
8-
import {LifecycleHooksFeature} from './component_ref';
98
import {ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineNgModule, ɵɵdefinePipe} from './definition';
109
import {ɵɵCopyDefinitionFeature} from './features/copy_definition_feature';
1110
import {ɵɵHostDirectivesFeature} from './features/host_directives_feature';
@@ -235,7 +234,6 @@ export {
235234
getDirectives,
236235
getHostElement,
237236
getRenderedText,
238-
LifecycleHooksFeature,
239237
PipeDef,
240238
ɵɵComponentDeclaration,
241239
ɵɵCopyDefinitionFeature,

0 commit comments

Comments
 (0)