Describe the bug
If you cause a memo to mutate in between two usages of latest(), the second one will ignore the changes
Your Example Website or App
https://stackblitz.com/edit/solidjs-templates-eanyzwnd?file=src%2FApp.tsx
Steps to Reproduce the Bug or Issue
- Navigate to the example link
- Press the "Test" button
- Look at the object that's being logged into the console
Expected behavior
When running
const v1 = m(); // 1
s(1);
const v2 = m(); // 1
const v3 = latest(m); // 3
const v4 = m(); // 1
s(2);
const v5 = m(); // 1
const v6 = latest(m); // 3 (This has not updated!)
flush();
const v7 = m(); // 5
console.log({ v1, v2, v3, v4, v5, v6, v7 });
I expected this to be logged
{
"v1": 1,
"v2": 1,
"v3": 3,
"v4": 1,
"v5": 1,
"v6": 5,
"v7": 5
}
but I got this instead
{
"v1": 1,
"v2": 1,
"v3": 3,
"v4": 1,
"v5": 1,
"v6": 3, // Wrong!
"v7": 5
}
Screenshots or Videos
No response
Platform
- OS: Windows
- Browser: Edge (The Chromium one)
- Version: 150.0.4078.65
Additional context
No response
Describe the bug
If you cause a memo to mutate in between two usages of
latest(), the second one will ignore the changesYour Example Website or App
https://stackblitz.com/edit/solidjs-templates-eanyzwnd?file=src%2FApp.tsx
Steps to Reproduce the Bug or Issue
Expected behavior
When running
I expected this to be logged
{ "v1": 1, "v2": 1, "v3": 3, "v4": 1, "v5": 1, "v6": 5, "v7": 5 }but I got this instead
{ "v1": 1, "v2": 1, "v3": 3, "v4": 1, "v5": 1, "v6": 3, // Wrong! "v7": 5 }Screenshots or Videos
No response
Platform
Additional context
No response