Skip to content

Get rid of HookPosition #7584

Closed
Closed

Description

@masenf

Describe the Enhancement you want
Hooks for a component should be rendered in the order they are declared and merged together.

HookPosition was added in 2024 as a rough hack for hook dependency ordering. At the time, hooks were held in an unordered set, so they inherently lost their ordering.

Since hooks are now saved in an ordered immutable tuple inside VarData, and VarData instances can be deterministically combined, there's no real reason to keep the kludgey HookPosition field: we should just render the hooks in the order they are encountered.

This isn't just nice to have! VarData.merge currently cannot represent different hooks with different positions, so when merging, the position field of VarData loses granularity and the resulting hooks when rendered can actually end up out of order and cause frontend errors.

Activity

  1. added
    enhancement
    on Oct 16, 2026
  2. linear-code commented on Oct 16, 2026

    @linear-code
  3. added a commit that references this issue on Oct 21, 2026
    d3f4ab1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions