Fix for <List> "unused" signal#791
Conversation
🦋 Changeset detectedLatest commit: 2f06d07 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Please remove changes to the changelog and package json, these are updated automatically by the ci workflow. |
|
Done.
But for that I argue that you can use arguments that are over what function mapFn(...args) {
const value = args[0];
const index = args[1];
console.log(`value = ${value}, index = ${index}`);
}
console.log(mapFn.length); // logs: 0
mapFn(1, 2); // logs: value = 1, index = 2Probably uncommon but still |
|
Ok so I found different way to fix this issue - when creating signal get fresh item index & value instead of one that it was created with. After this change new test passes |
I found that the "signal created when used" is giving wrong values when it's read only later after changes (eg. only in event callback function and none in jsx or other signals or component creation - work correctly if it's used there).