You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
linear-code commentedon Oct 16, 2026
ENG-13400
fix: render hooks in declaration order instead of by HookPosition (re…