-
Notifications
You must be signed in to change notification settings - Fork 36
Home
Nikhil Kothari edited this page Apr 19, 2024
·
6 revisions
Welcome to the frappe-react-sdk documentation!
🚧 This documentation is still a work-in-progress. The sections below will be added as Wiki pages soon.
- Username and Password
- OAuth
- Support for 2FA
- Authenticate using API Key/Token
Database hooks use the standard REST APIs that are available in Frappe framework for fetching and updating documents.
- Fetching a list of documents - useFrappeGetDocList
- Fetching a document (
useFrappeGetDoc
) - Creating a document (
useFrappeCreateDoc
) - Updating a document (
useFrappeUpdateDoc
) - Deleting a document (
useFrappeDeleteDoc
) - Getting number of documents (
useFrappeGetDocCount
)
To make API calls to custom endpoints, you can use the following hooks:
useFrappeGetCall
useFrappePostCall
useFrappePutCall
useFrappeDeleteCall
Frappe support realtime events over websockets via Socket.io . Frappe React SDK has first-class support for these socket events.
- Listening to events
- Subscribing to "DocType" events
- Subscribing to "Document" events
- Uploading files
- Using SWR
- Using frappe-js-sdk in frappe-react-sdk directly
- How to use the SWR configuration?
- How to use caching in SWR (keys in SWR)?
- How do I only make a fetch/GET request conditionally instead of on mount?
- How do I stop unnecessary re-requests on focus/error?