2.0.0 docs missing migration guide for ref changes

Open
#1,630 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Quiet
Tech stack
typescript
Domain
documentation

Research direction

Start with the migration guide at https://v2.solidjs.com/migration/from-solid-1 and compare its existing coverage with the ref callback examples in the issue. Document the Solid 1.x to 2.x migration path for ref ownership and cleanup, including the reason for the ownership change and whether the proposed wrapper approach is required.

Written by the indexing model from the issue text.

Description

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?

Dominant language
MDX
Stars
292
Forks
361
Avg merge
7h 51m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from solidjs/solid-docs

All issues in solidjs/solid-docs

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.