Anul 3 Semestrul 1
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { initDB } from "@/database/localdb";
|
||||
import { useEffect } from "react";
|
||||
import { View } from "react-native";
|
||||
import { useDispatch } from "react-redux";
|
||||
|
||||
|
||||
export const DataLoader = () => {
|
||||
const dispatch = useDispatch();
|
||||
useEffect(() => {
|
||||
const fetchData = async () => {
|
||||
dispatch({ type: 'drug/initialize' });
|
||||
dispatch({ type: 'drug/fetch' });
|
||||
};
|
||||
fetchData();
|
||||
}, [dispatch]);
|
||||
return (<View></View>);
|
||||
};
|
||||
Reference in New Issue
Block a user