JS: Add test for react 'use' function

This commit is contained in:
Asger F
2025-06-23 15:26:08 +02:00
parent 93c891a987
commit 768ccc6a54

View File

@@ -0,0 +1,12 @@
import { use } from "react";
async function fetchData() {
return new Promise((resolve) => {
resolve(source("fetchedData"));
});
}
function Component() {
const data = use(fetchData());
sink(data); // $ MISSING: hasValueFlow=fetchedData
}