Skip to content

Repeated DOM structure recreation warnings on Angular 18.2 #93

Closed
@kulitha

Description

@kulitha

Repeated warnings about recreation of DOM structure are displayed on console whenever there's a diff update. I am using Angular 18.2. I tried using this on a new Angular project using the exact demo that was provided for this package, but the warnings still persist.

ngx-diff.-.console.warnings.mp4

This is the warning that shows up in the console.

NG0956: The configured tracking expression (track by identity) caused re-creation of the entire collection of size 7. This is an expensive operation requiring destruction and subsequent creation of DOM nodes, directives, components etc. Please review the "track expression" and make sure that it uniquely identifies items in a collection. Find more at https://angular.dev/errors/NG0956

Relevant error link

It seems like it could be fixed by changing the tracking expression (most likely for the line difference).

Any help would be much appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions