MCPcopy Create free account
hub / github.com/expo/examples / refetch

Function refetch

with-sqlite/App.tsx:42–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40
41 const refetchItems = useCallback(() => {
42 async function refetch() {
43 await db.withExclusiveTransactionAsync(async () => {
44 setTodoItems(
45 await db.getAllAsync<ItemEntity>(
46 'SELECT * FROM items WHERE done = ?',
47 false
48 )
49 );
50 setDoneItems(
51 await db.getAllAsync<ItemEntity>(
52 'SELECT * FROM items WHERE done = ?',
53 true
54 )
55 );
56 });
57 }
58 refetch();
59 }, [db]);
60

Callers 2

MainFunction · 0.70
AppFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected