This module offers a set of hooks to work with Firebase platorrm.
Run the following command to install:
npm i react-query-firebase @tanstack/react-query --save
import { useQuery, FirebaseContextProvider } from "react-query-firebase";
const firebaseConfig = {};
export const App = () => {
const [queryClient] = useState(() => new QueryClient({ defaultOptions: { queries: { throwOnError: true } } }));
return (
<QueryClientProvider client={queryClient}>
<FirebaseContextProvider options={firebaseConfig}>
<ChildComponent />
</FirebaseContextProvider>
</QueryClientProvider>
);
};
export const ChildComponent = () => {
const { data, isFetching } = useQuery({});
return <div>{JSON.stringify(data)}</div>;
};
You are encouraged to contribute to this project as soon as you see any defects or issues.
This repository contains configuration for VSCode editor. It doesn't mean that you cannot use a different tool. Feel free to push configurations for your favourite code editor.
- To build :
npm run build
- To lint use:
npm run lint
- To initialize pre-commit hooks use:
npm run prepare
Before you get started make sure that there is noone working on an issue you are going to address.
As a first step, clone the repository and run npm i && npm run prepare
command to install all dependencies and initialize pre-commit hooks.
Create a branch to work on your code changes.
Once you are done with coding, create pull request and get an approval.
Lastly, enjoy your changes.