I am trying to access Payload Local Api in my custom view that is overwriting the "List" view of one collection, if I import payload and I try to access payload.find I get
payload__WEBPACK_IMPORTED_MODULE_1__.default.find is not a function
You cannot access Local API from front-end if I understood correctly. You must use either REST or GraphQL. In admin panel there might be some ready-made way to access the REST API. Maybe using React hooks?
Now i understand, thank you
@Enrico How did you solve this?
@René I used the standard REST api:
https://payloadcms.com/docs/rest-api/overview@Enrico Alright. Thanks.
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.