Current Code
const asyncAtom = atom(async () => {
const res = await (
await fetch("http://localhost:3000/api/transactions")
).json();
return res;
});
const loadableAtom = loadable(asyncAtom);
const [transactions] = useAtom(loadableAtom);
How can I update the transactions if I want to refetch the data?
With setTransactions I get the error "This expression is not callable. Type 'never' has no call signatures.ts(2349)".