UNPKG

tqf

Version:

React Query hooks for Firebase.

28 lines (22 loc) 1.19 kB
--- title: Functions Basic Example | React Query Firebase description: A basic example of using the useAuthUser hook. --- # Functions: Basic Example This example loads a joke from a deployed [callable HTTPS function](https://github.com/invertase/react-query-firebase/blob/main/functions/src/index.js) called `getJoke`, using the the `useFunctionsQuery` hook, and allows you to fetch a new joke using the `useFunctionsMutation` hook. > [View example code.](https://github.com/invertase/react-query-firebase/tree/main/examples/functions-basic) export const iframe = () => <iframe />; <iframe src="https://codesandbox.io/embed/github/invertase/react-query-firebase/tree/main/examples/functions-basic?fontsize=14&hidenavigation=1&theme=dark" style={{ width: "100%", height: "700px", border: "0", borderRadius: "4px", overflow: "hidden", }} title="invertase/react-query-firebase: functions-basic" allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking" sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts" />