Skip to content

Remove selector useLiveRef from Onyx #70296

Closed

Description

@roryabraham

HOLD for #70272

Problem

Selectors in useOnyx are wrapped with useLiveRef to get a stable reference even for inline selectors. This was a helpful convenience when it's added, but some things have changed:

  1. We added a cache for useOnyx that benefits from using a shared stable reference for selectors.
  2. In [Due for payment 2025-11-14] [$1250] Forbid inline useOnyx selectors #70272 we are going to forbid inline selectors and refactor E/App to ensure all selectors are not inline.

After that's done, useLiveRef will contribute complexity without having any value. Furthermore, it may cause unexpected behaviors, in that useOnyx will not re-run if the selector changes unless you explicitly pass the selector as a dependency.

Solution

Remove the useLiveRef wrapper from selectors in useOnyx. We don't need it anymore.

Activity

  1. roryabraham commented on Sep 20, 2025

    @roryabraham
    ContributorAuthor

    Still on HOLD

  2. roryabraham commented on Sep 29, 2025

    @roryabraham
    ContributorAuthor

    Still on HOLd

  3. roryabraham commented on Oct 13, 2025

    @roryabraham
    ContributorAuthor

    Still on HOLD, but getting close

  4. 39 remaining items

  5. roryabraham commented on Feb 9, 2026

    @roryabraham
    ContributorAuthor

    No update

  6. melvin-bot commented on Mar 5, 2026

    @melvin-bot

    This issue has not been updated in over 15 days. @TMisiukiewicz, @roryabraham eroding to Monthly issue.

    P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

  7. roryabraham commented on Apr 8, 2026

    @roryabraham
    ContributorAuthor

    no update

  8. roryabraham commented on May 12, 2026

    @roryabraham
    ContributorAuthor

    wasn't able to reproduce the reported bug, closing this out

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

Metadata

Metadata

Labels

ImprovementItem broken or needs improvement.MonthlyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions