@umang-thakkar/base-template 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -74,7 +74,10 @@ template/
74
74
 
75
75
  ## 🚀 Getting Started
76
76
 
77
- 1. Clone the repo and navigate to the project folder.
77
+ 1. Create a new project using this template:
78
+ ```sh
79
+ npx @react-native-community/cli init MyApp --template @umang-thakkar/base-template
80
+ Note: Replace MyApp with your own project name.
78
81
  2. Install dependencies:
79
82
  ```sh
80
83
  npm install
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umang-thakkar/base-template",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "The template for react native to setup redux and other neccesary boilerplate codes",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -1,6 +1,6 @@
1
1
  import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
2
2
  import { addTodo, deleteTodo, fetchTodoById, fetchTodos } from "./service";
3
- const queryClient = useQueryClient()
3
+
4
4
 
5
5
  export const useTodos = () => {
6
6
  return useQuery({
@@ -17,6 +17,7 @@ export const useTodoById = (id: number) => {
17
17
  };
18
18
 
19
19
  export const useAddTodo = () => {
20
+ const queryClient = useQueryClient()
20
21
  return useMutation({
21
22
  mutationFn: addTodo,
22
23
  onSuccess: () => {
@@ -26,6 +27,7 @@ export const useAddTodo = () => {
26
27
  };
27
28
 
28
29
  export const useDeleteTodo = () => {
30
+ const queryClient = useQueryClient()
29
31
  return useMutation({
30
32
  mutationFn: deleteTodo,
31
33
  onSuccess: () => {