Skip to content

Provide better track id #4

Description

@Enngage

In

@for (item of items(); track $index) {
you should ideally provide a unique identifier of the block instead of relying to $index ->

In some cases, especially with static or less dynamic data, you might find `track $index` handy. However, be cautious as it isn't a one-size-fits-all solution. If you're dealing with mutable data or frequent changes, it might behave
unpredictably. It's best to stick with a unique and immutable property from your data as the tracking key; this ensures
objects are identified correctly. Context matters a lot, so choose the `track` expression that fits your data
scenario.```

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions