Skip to content

2.0.0 docs missing migration guide for ref changes #1630

Open

Description

@mizulu

https://v2.solidjs.com/migration/from-solid-1

<div ref={()=>{
  console.log(getOwner()) // 1.x(true)   2.x(false)
 }}>
</div>

solid 1.x ref is owned ( https://s.olid.uk/id/qSQe8ZJ6QRyiJTtdfQDNrQ )
solid 2.x ref is non owned ( https://s.olid.uk/id/KyofyVLqQC2upVRrxbCTYw )

In 1.x we could register cleanup in the ref callback, but not in solid 2.x
no ownership is documented in the docs for 2.x . but the migration guide is not addressing it.

it should show the migration path for ref changes.

I assume that we now requires an higher order component wrapper

also what is the reason that ref has no owner?

Activity

  1. ryansolid commented on Aug 17, 2026

    @ryansolid
    Member

    The migration guide at v2.solidjs.com is maintained in the solid-docs repo, so transferring this issue there. The gap is real — the page covers use: → ref migration but not the ownership change (getOwner() is null inside a ref callback in 2.0, so 1.x-style onCleanup registration inside refs no longer works).

  2. transferred this issue fromsolidjs/solidon Aug 17, 2026
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