Remove caching. That caching is breaking the program in case of change.
Note: "use server" is not good because force the fetch to be action/static so the client doesn't call them again explicitly during render (I think?)
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import { getContact, getContacts } from "@/app/data";
|
||||
import { cache } from "react";
|
||||
|
||||
export const fetchContacts = cache(async () => {
|
||||
export const fetchContacts = async () => {
|
||||
return await getContacts();
|
||||
});
|
||||
};
|
||||
|
||||
export const fetchContact = cache(async (contactId: string) => {
|
||||
export const fetchContact = async (contactId: string) => {
|
||||
return await getContact(contactId);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user