i have a scrollView with a refreshControl. Right now, that is a "On sale" screen that pulls a json file and writes to a hook. (maybe thats my issue?)
It works flawlessly in dev mode, and has been working fine in production up until recently. (past month)
It's like there is a cache that is stuck inside the app. Restarting the app does not help. And i am able to verify that it is not a server issue.
update i removed and re-downloaded the app and now its pulling the correct data. I can change the data and and refresh the screen and its working correctly.
My (non-tech) coworkers are currently running into the issue as well.
Any ideas?
const { width } = Dimensions.get("window");
const [data, setData] = useState([]);
const [refreshing, setRefreshing] = useState(false);
useEffect(() => {
fetch(URL)
.then((response) => response.json())
.then((data) => {
setData(data);
});
}, []);
const onRefresh = useCallback(() => {
try {
Haptics.notificationAsync(Haptics.NotificationFeedbackType.Success);
fetch(URL)
.then((response) => response.json())
.then((data) => {
setData(data);
});
} catch (error) {
Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error);
}
});