Node reordering with adapter throws an error
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 91
- Avg merge
- 9d 14h
- Merged PRs (30d)
- 38
Description
Reordering causes the node to get removed and then instantly re-inserted. When it's removed the listeners get instantly released which causes an error:
Uncaught Error: You attempted to call a function that was already released.
The receivers don't suffer from that as even listeners are leaking there.
Fixing https://github.com/Shopify/remote-dom/issues/562 will probably fix this issue but depending on the implementation might require some changes in the adapter.
A "fix" until then is to not release:
import {retain} from 'rpc_library';
function release() {}
const receiver = new SignalRemoteReceiver({retain, release});
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing node reordering with the adapter and inspect the SignalRemoteReceiver retain/release behavior described in the issue. Review issue #562 first, then determine how the adapter should handle removal followed by immediate reinsertion. Done means reordering no longer raises the released-function error without relying on the no-op release workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100