{"id":2812,"date":"2026-07-30T10:21:00","date_gmt":"2026-07-30T10:21:00","guid":{"rendered":"https:\/\/adjoe.io\/company\/engineer-blog\/meet-paridokht-rtk-query-mock-service-worker\/"},"modified":"2026-11-24T17:36:03","modified_gmt":"2026-11-24T17:36:03","slug":"meet-paridokht-rtk-query-mock-service-worker","status":"publish","type":"engineer_blog","link":"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/meet-paridokht-rtk-query-mock-service-worker\/","title":{"rendered":"Best practices: RTK query and leveraging new libraries"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">At <a href=\"https:\/\/adjoe.io\/\" target=\"_blank\" rel=\"noreferrer noopener\">adjoe<\/a>, we use RTK Query for several reasons. It can simplify state management, reduce boilerplate code, improve type safety and middleware integration, and enhance the overall development experience.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Besides RTK Query, our team uses Mock Service Worker (mswjs), which offers significant benefits by simplifying and enhancing the testing and development process for web applications that interact with APIs. It has several benefits, including mocking API responses and isolating FE and BE development.These are my best practices for the <a href=\"https:\/\/redux-toolkit.js.org\/rtk-query\/overview\" target=\"_blank\" rel=\"noreferrer noopener\">RTK Query<\/a> and <a href=\"https:\/\/mswjs.io\/\" target=\"_blank\" rel=\"noreferrer noopener\">Mock Service Worker<\/a> libraries.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">No writing data-fetching and caching logic yourself<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">RTK Query provides me with different hooks that can easily be reused for the logic of my component and fetching its data. And besides that, with RTK Query, I don\u2019t need to<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>write caching mechanisms from scratch<\/li>\n\n\n\n<li>spend time and energy writing the code myself \u2013 we don\u2019t need to write some logic from scratch, as this library provides us with some custom hooks<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Since implementing this advanced data-fetching and caching tool, I have so far been able to reduce time spent writing code by around 70 percent. That\u2019s 70 percent less time writing or worrying about caching or fetching \u2013 just from implementing and running RTK Query on production for around three months.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Cleaner code and cache mutations<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s say I want to display a list of todos in adjoe\u2019s application. I need to fetch them from the API. To do this, I can use a React app using TypeScript and start a new project by running the command below in terminal.<\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">TypeScript-JSX<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code\">npx create-react-app todos --template typescript<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">1. Once the demo project is ready, I need to install some dependencies.<\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">TypeScript-JSX<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code\">npm install redux react-redux\nnpm install @reduxjs\/toolkit<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">2. I define the \u201cTodo\u201d type (if I\u2019m using TypeScript in the application): <code>src\/types.d.ts.<\/code><\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">TypeScript-JSX<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code\">type Todo = {\n userId: number;\n id: number;\n title: string;\n completed: boolean;\n};<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">3. Now, I\u2019m ready to create an API slice: <code>src\/api\/apiSlice.ts.<\/code><\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">TypeScript-JSX<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code\">import { createApi, fetchBaseQuery } from &quot;@reduxjs\/toolkit\/query\/react&quot;;\n \nexport const apiSlice = createApi({\n reducerPath: &quot;api&quot;,\n baseQuery: fetchBaseQuery({\n   baseUrl: &quot;https:\/\/jsonplaceholder.typicode.com&quot;,\n }),\n endpoints: (builder) =&gt; ({\n   getTodos: builder.query&lt;Todo[], void&gt;({\n     query: () =&gt; &quot;\/todos&quot;,\n     transformResponse: (response: Todo[]) =&gt; {\n       let filtered = response.filter((r) =&gt; r.id &lt;= 10);\n       return filtered.sort((a, b) =&gt; b.id - a.id);\n     },\n   }),\n }),\n});\n \n\/\/ custom hooks based on the methods that we provide\nexport const {\n useGetTodosQuery,\n} = apiSlice;<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">4. After this, I need to wrap the application component with \u201cApiProvider\u201d:<code> src\/index.tsx.<\/code><\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">TypeScript-JSX<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code\">import { ApiProvider } from &quot;@reduxjs\/toolkit\/query\/react&quot;;\nimport { apiSlice } from &quot;.\/api\/apiSlice&quot;;\nroot.render(\n &lt;React.StrictMode&gt;\n   &lt;ApiProvider api={apiSlice}&gt;\n     &lt;App \/&gt;\n   &lt;\/ApiProvider&gt;\n &lt;\/React.StrictMode&gt;\n);<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">5. Then I can use the custom hook created by RTK Query in <code>Todos.tsx<\/code> component <code>src\/Todos.tsx.<\/code><\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">TypeScript-JSX<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code\">import { useGetTodosQuery } from &quot;..\/api\/apiSlice&quot;;\n\n\nexport const Todos = () =&gt; {\n const { data: todos, isError, isFetching, error } = useGetTodosQuery();\n\n\n if (isFetching) return &lt;p&gt;Loading...&lt;\/p&gt;;\n if (isError) return &lt;p&gt;{JSON.stringify(error)}&lt;\/p&gt;;\n return (\n   &lt;&gt;\n     {todos?.map((todo) =&gt; (\n       &lt;p key={todo.id}&gt;\n         {todo.title}\n       &lt;\/p&gt;\n     ))}\n   &lt;\/&gt;\n );\n};<\/code><\/pre>\n\t<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Utilize custom hooks for CRUD operations<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">I can also add API calls for <em>add<\/em>, <em>delete<\/em>, and <em>update<\/em> operations and utilize custom hooks available from RTK Query. I can add code below to the API slice endpoints object <code>src\/api\/apiSlice.ts.<\/code><\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">TypeScript-JSX<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code\">  addTodo: builder.mutation({\n     query: (todo: Todo) =&gt; ({\n       url: &quot;\/todos&quot;,\n       method: &quot;POST&quot;,\n       body: todo,\n     }),\n   }),\n   updateTodo: builder.mutation({\n     query: (todo: Todo) =&gt; ({\n       url: `todos\/${todo.id}`,\n       method: &quot;PUT&quot;,\n       body: todo,\n     }),\n   }),\n   deleteTodo: builder.mutation({\n     query: (id: number) =&gt; ({\n       url: `\/todos\/${id}`,\n       method: &quot;DELETE&quot;,\n     }),\n   }),<\/code><\/pre>\n\t<\/div>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">TypeScript-JSX<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code\">export const {\n useAddTodoMutation,\n useDeleteTodoMutation,\n useUpdateTodoMutation\n} = apiSlice;<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><code>src\/Todo.tsx<\/code><\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">TypeScript-JSX<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code\"> const [addTodo] = useAddTodoMutation();\n const [deleteTodo] = useDeleteTodoMutation();\n   const [updateTodo] = useUpdateTodoMutation();<\/code><\/pre>\n\t<\/div>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">TypeScript-JSX<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code\"> deleteTodo(todo.id);\n addTodo({id: 201, userId: 10, title: &#039;new todo is added&#039;, completed: false});\n   updateTodo({ id: 193, userId: 10, title: &quot;my first todo item&quot;, completed: true });<\/code><\/pre>\n\t<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Assigning a Tag to the Cache<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In this process, results get cached, and I don\u2018t invalidate the previous cache. This means the component doesn\u2019t display the new changes upon adding, deleting, or updating a todo item. To resolve this issue, I can assign a tag to the cache to let it know which mutation invalidates the cache to ensure it automatically refetches that data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>src\/api\/apiSlice.ts<\/code><\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">TypeScript-JSX<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code\">import { createApi, fetchBaseQuery } from &quot;@reduxjs\/toolkit\/query\/react&quot;;\n \nexport const apiSlice = createApi({\n reducerPath: &quot;api&quot;,\n baseQuery: fetchBaseQuery({\n   baseUrl: &quot;https:\/\/jsonplaceholder.typicode.com&quot;,,\n }),\n tagTypes: [&quot;Todos&quot;], \/\/defining tags&#039; type\n endpoints: (builder) =&gt; ({\n   getTodos: builder.query&lt;Todo[], void&gt;({\n     query: () =&gt; &quot;\/todos&quot;,\n     transformResponse: (response: Todo[]) =&gt; {\n       let copy = response.filter((r) =&gt; r.id &lt;= 10);\n       return copy.sort((a, b) =&gt; b.id - a.id);\n     },\n     providesTags: [&quot;Todos&quot;], \/\/ defining a tag for this call\n   }),\n   addTodo: builder.mutation({\n     query: (todo: Todo) =&gt; ({\n       url: &quot;\/todos&quot;,\n       method: &quot;POST&quot;,\n       body: todo,\n     }),\n     invalidatesTags: [&quot;Todos&quot;], \/\/ invalidate this tag for this mutation so that data can automatically re-fetched\n   }),\n   updateTodo: builder.mutation({\n     query: (todo: Todo) =&gt; ({\n       url: `todos\/${todo.id}`,\n       method: &quot;PUT&quot;,\n       body: todo,\n     }),\n     invalidatesTags: [&quot;Todos&quot;], \/\/ invalidate this tag for this mutation so that data can automatically re-fetched\n   }),\n   deleteTodo: builder.mutation({\n     query: (id: number) =&gt; ({\n       url: `\/todos\/${id}`,\n       method: &quot;DELETE&quot;,\n     }),\n     invalidatesTags: [&quot;Todos&quot;], \/\/ invalidate this tag for this mutation so that data can automatically re-fetched\n   }),\n }),\n});\n \n\/\/ custom hooks based on the methods that we provide\nexport const {\n useGetTodosQuery,\n useAddTodoMutation,\n useDeleteTodoMutation,\n useUpdateTodoMutation,\n} = apiSlice;<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Besides eliminating the need to hand-write code yourself, the tool has more tricks up its sleeve to further optimize development processes.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I have ideas on how to further leverage RTK Query by use case. When the frequency of data change is high (for example, one second or less than 30 seconds), and the application should show data instantly; it should not use the cached data. However, when the data frequency is less and the response object is big (for example, more than 1MB), the team can enable caching. This enables a better user experience and also reduces the burden on adjoe\u2019s servers.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">mswjs: API mocking for testing, development, and debugging<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In an ecosystem where there is little documentation on testing RTK Query hooks, our frontend team found the mswjs library while researching what other React developers are utilizing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We decided to use mswjs for two reasons. 1) To use mock data and develop new features in the frontend when the endpoint is not ready on the server side and 2) to write unit tests for components using RTK to fetch data since it intercepts requests on the network level. When it comes to Mock Service Worker, you should know the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The library is designed to intercept requests on the network level, and mock data helps write the test for RTK Query to test the API and components.<\/li>\n\n\n\n<li>This way, we don\u2019t need to call the API on the server, and mocking is completely seamless.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Test Your Component in mswjs&nbsp;<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When I want to test a component that fetches data from an adjoe API with the mswjs library and mock the API response, I need to install the necessary dependencies.<\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">TypeScript-JSX<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code\">npm install msw --save-dev<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">2. Then I can define the mocks: <code>src\/test\/mocks\/todoMocks.ts.<\/code><\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">TypeScript-JSX<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code\">export const todoMocks: Todo[] = [\n {\n   id: 1,\n   userId: 10,\n   title:\n     &quot;temporibus atque distinctio omnis eius impedit tempore molestias pariatur&quot;,\n   completed: true,\n },\n {\n   id: 2,\n   userId: 10,\n   title: &quot;ut quas possimus exercitationem sint voluptates&quot;,\n   completed: false,\n },\n {\n   id: 3,\n   userId: 10,\n   title: &quot;rerum debitis voluptatem qui eveniet tempora distinctio a&quot;,\n   completed: false,\n },\n {\n   id: 4,\n   userId: 10,\n   title: &quot;sed ut vero sit molestiae&quot;,\n   completed: true,\n },\n];<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><code>src\/test\/mocks\/handlers.ts<\/code><\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">TypeScript-JSX<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code\">import { rest } from &quot;msw&quot;;\nimport { todoMocks } from &quot;.\/todoMocks&quot;;\n \nexport const handlers = [\n rest.get(&quot;https:\/\/jsonplaceholder.typicode.com\/todos&quot;, (_, res, ctx) =&gt;\n   res(ctx.status(200), ctx.json&lt;Todo[]&gt;(todoMocks))\n ),\n];<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">3. Afterward, I set up the server: <code>src\/test\/server.ts.<\/code><\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">TypeScript-JSX<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code\">import { setupServer } from &quot;msw\/node&quot;;\nimport { handlers } from &quot;.\/handlers&quot;;\n \nexport const server = setupServer(...handlers);<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">4. Finally, I can implement the unit test: <code>src\/Todos.spec.tsx.<\/code><\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">TypeScript-JSX<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code\">import { screen, waitFor, render } from &quot;@testing-library\/react&quot;;\nimport { ApiProvider } from &quot;@reduxjs\/toolkit\/query\/react&quot;;\nimport { server } from &quot;..\/test\/server&quot;;\nimport { Todos } from &quot;.\/Todos&quot;;\nimport { apiSlice } from &quot;..\/api\/apiSlice&quot;;\n \ndescribe(&quot;Todos&quot;, () =&gt; {\n beforeAll(() =&gt; {\n   server.listen();\n });\n \n afterEach(() =&gt; {\n   server.resetHandlers();\n });\n \n afterAll(() =&gt; {\n   server.close();\n });\n \n it(&quot;should display todos&quot;, async () =&gt; {\n   render(\n     &lt;ApiProvider api={apiSlice}&gt;\n       &lt;Todos \/&gt;\n     &lt;\/ApiProvider&gt;\n   );\n \n   await waitFor(() =&gt; {\n     expect(screen.getByText(&quot;sed ut vero sit molestiae&quot;)).toBeInTheDocument();\n   });\n });\n});<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">At adjoe, we will be able to develop mswjs incrementally in order to improve the unit tests of components that make API calls by defining mocks at the network level. We can also seamlessly reuse the same mock definition for testing, development, and debugging.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Quality code and faster frontend processes<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Using RTK and mswjs in combination with each other streamlines development, we enhance code quality and promote efficient testing. This results in a more robust and faster development process \u200b\u200bwithout having to hand-write code ourselves.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With the RTK caching mechanism, you can improve behind-the-scenes performance when dealing with large amounts of daily user data and decrease costs when requesting data from the BE. With mswjs it is possible to isolate FE and BE development, ensuring consistent testing and reducing test execution time.<\/p>\n\n\n<section class=\"l-section l-section--jobs-include is-light l-pt-lg l-pb-lg\" data-block=\"jobs-include\">\n\t<div class=\"l-wrapper\">\n\t\t<div class=\"jobs-include\">\n\t\t\t\n\t\t\t<div class=\"jobs-include__table-wrap\" tabindex=\"0\">\n\t\t\t\t<table id=\"jobs-include-table-1\" class=\"jobs-include__table\">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th scope=\"col\">Role<\/th>\n\t\t\t\t\t\t\t<th scope=\"col\">Team<\/th>\n\t\t\t\t\t\t\t<th scope=\"col\">Location<\/th>\n\t\t\t\t\t\t<\/tr>\n\t\t\t\t\t<\/thead>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th scope=\"row\" data-label=\"Role\">\n\t\t\t\t\t\t\t\t\t<a class=\"jobs-include__role\" href=\"https:\/\/adjoe.io\/ko\/careers\/open-positions\/5c1d70f8-e163-424f-b9af-91745beb1e06\/\">\n\t\t\t\t\t\t\t\t\t\tSenior Data Engineer (f\/m\/d)\t\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t<\/th>\n\t\t\t\t\t\t\t\t<td data-label=\"Team\">\n\t\t\t\t\t\t\t\t\tPlaytime Data Science\t\t\t\t\t\t\t\t<\/td>\n\t\t\t\t\t\t\t\t<td data-label=\"Location\">\n\t\t\t\t\t\t\t\t\tHamburg\t\t\t\t\t\t\t\t<\/td>\n\t\t\t\t\t\t\t<\/tr>\n\t\t\t\t\t\t\t\t\t\t\t<\/tbody>\n\t\t\t\t<\/table>\n\t\t\t<\/div>\n\t\t<\/div>\n\t<\/div>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>At adjoe, we use RTK Query for several reasons. It can simplify state management, reduce boilerplate code, improve type safety&#8230;<\/p>\n","protected":false},"author":63,"featured_media":6199,"template":"","engineer_blog_category":[73],"class_list":["post-2812","engineer_blog","type-engineer_blog","status-publish","has-post-thumbnail","hentry","engineer_blog_category-frontend"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>RTK Query and Leveraging New Libraries | adjoe technology<\/title>\n<meta name=\"description\" content=\"Discover why adjoe tech team are using RTK Query &amp; Mock Service Worker for more seamless development processes.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/meet-paridokht-rtk-query-mock-service-worker\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"RTK Query and Leveraging New Libraries | adjoe technology\" \/>\n<meta property=\"og:description\" content=\"Discover why adjoe tech team are using RTK Query &amp; Mock Service Worker for more seamless development processes.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/meet-paridokht-rtk-query-mock-service-worker\/\" \/>\n<meta property=\"og:site_name\" content=\"adjoe | Making every interaction the start of lasting value\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/people\/Adjoe\/100076450974671\/\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-24T17:36:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/adjoe.io\/wp-content\/uploads\/2026\/09\/9-RTK-Query-Mock-Service-Worker_-Frontend-Insights-_-adjoe.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"1190\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/company\\\/engineer-blog\\\/meet-paridokht-rtk-query-mock-service-worker\\\/\",\"url\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/company\\\/engineer-blog\\\/meet-paridokht-rtk-query-mock-service-worker\\\/\",\"name\":\"RTK Query and Leveraging New Libraries | adjoe technology\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/company\\\/engineer-blog\\\/meet-paridokht-rtk-query-mock-service-worker\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/company\\\/engineer-blog\\\/meet-paridokht-rtk-query-mock-service-worker\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/adjoe.io\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/9-RTK-Query-Mock-Service-Worker_-Frontend-Insights-_-adjoe.png\",\"datePublished\":\"2026-07-30T10:21:00+00:00\",\"dateModified\":\"2026-11-24T17:36:03+00:00\",\"description\":\"Discover why adjoe tech team are using RTK Query & Mock Service Worker for more seamless development processes.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/company\\\/engineer-blog\\\/meet-paridokht-rtk-query-mock-service-worker\\\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/adjoe.io\\\/ko\\\/company\\\/engineer-blog\\\/meet-paridokht-rtk-query-mock-service-worker\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/company\\\/engineer-blog\\\/meet-paridokht-rtk-query-mock-service-worker\\\/#primaryimage\",\"url\":\"https:\\\/\\\/adjoe.io\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/9-RTK-Query-Mock-Service-Worker_-Frontend-Insights-_-adjoe.png\",\"contentUrl\":\"https:\\\/\\\/adjoe.io\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/9-RTK-Query-Mock-Service-Worker_-Frontend-Insights-_-adjoe.png\",\"width\":1800,\"height\":1190},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/company\\\/engineer-blog\\\/meet-paridokht-rtk-query-mock-service-worker\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Best practices: RTK query and leveraging new libraries\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/#website\",\"url\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/\",\"name\":\"adjoe | Making every interaction the start of lasting value\",\"description\":\"adjoe is a global tech company powering user acquisition, monetization and audience engagement across the app economy \u2013 making every interaction the start of lasting value.\",\"publisher\":{\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/#organization\",\"name\":\"adjoe | Making every interaction the start of lasting value\",\"url\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/adjoe.io\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/OG-img-1200x630-1.jpg\",\"contentUrl\":\"https:\\\/\\\/adjoe.io\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/OG-img-1200x630-1.jpg\",\"width\":1200,\"height\":630,\"caption\":\"adjoe | Making every interaction the start of lasting value\"},\"image\":{\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/people\\\/Adjoe\\\/100076450974671\\\/\",\"https:\\\/\\\/www.instagram.com\\\/adjoe.io\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/adjoe\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"RTK Query and Leveraging New Libraries | adjoe technology","description":"Discover why adjoe tech team are using RTK Query & Mock Service Worker for more seamless development processes.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/meet-paridokht-rtk-query-mock-service-worker\/","og_locale":"ko_KR","og_type":"article","og_title":"RTK Query and Leveraging New Libraries | adjoe technology","og_description":"Discover why adjoe tech team are using RTK Query & Mock Service Worker for more seamless development processes.","og_url":"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/meet-paridokht-rtk-query-mock-service-worker\/","og_site_name":"adjoe | Making every interaction the start of lasting value","article_publisher":"https:\/\/www.facebook.com\/people\/Adjoe\/100076450974671\/","article_modified_time":"2026-11-24T17:36:03+00:00","og_image":[{"width":1800,"height":1190,"url":"https:\/\/adjoe.io\/wp-content\/uploads\/2026\/09\/9-RTK-Query-Mock-Service-Worker_-Frontend-Insights-_-adjoe.png","type":"image\/png"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/meet-paridokht-rtk-query-mock-service-worker\/","url":"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/meet-paridokht-rtk-query-mock-service-worker\/","name":"RTK Query and Leveraging New Libraries | adjoe technology","isPartOf":{"@id":"https:\/\/adjoe.io\/ko\/#website"},"primaryImageOfPage":{"@id":"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/meet-paridokht-rtk-query-mock-service-worker\/#primaryimage"},"image":{"@id":"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/meet-paridokht-rtk-query-mock-service-worker\/#primaryimage"},"thumbnailUrl":"https:\/\/adjoe.io\/wp-content\/uploads\/2026\/09\/9-RTK-Query-Mock-Service-Worker_-Frontend-Insights-_-adjoe.png","datePublished":"2026-07-30T10:21:00+00:00","dateModified":"2026-11-24T17:36:03+00:00","description":"Discover why adjoe tech team are using RTK Query & Mock Service Worker for more seamless development processes.","breadcrumb":{"@id":"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/meet-paridokht-rtk-query-mock-service-worker\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/adjoe.io\/ko\/company\/engineer-blog\/meet-paridokht-rtk-query-mock-service-worker\/"]}]},{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/meet-paridokht-rtk-query-mock-service-worker\/#primaryimage","url":"https:\/\/adjoe.io\/wp-content\/uploads\/2026\/09\/9-RTK-Query-Mock-Service-Worker_-Frontend-Insights-_-adjoe.png","contentUrl":"https:\/\/adjoe.io\/wp-content\/uploads\/2026\/09\/9-RTK-Query-Mock-Service-Worker_-Frontend-Insights-_-adjoe.png","width":1800,"height":1190},{"@type":"BreadcrumbList","@id":"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/meet-paridokht-rtk-query-mock-service-worker\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/adjoe.io\/ko\/"},{"@type":"ListItem","position":2,"name":"Best practices: RTK query and leveraging new libraries"}]},{"@type":"WebSite","@id":"https:\/\/adjoe.io\/ko\/#website","url":"https:\/\/adjoe.io\/ko\/","name":"adjoe | Making every interaction the start of lasting value","description":"adjoe is a global tech company powering user acquisition, monetization and audience engagement across the app economy \u2013 making every interaction the start of lasting value.","publisher":{"@id":"https:\/\/adjoe.io\/ko\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/adjoe.io\/ko\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/adjoe.io\/ko\/#organization","name":"adjoe | Making every interaction the start of lasting value","url":"https:\/\/adjoe.io\/ko\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/adjoe.io\/ko\/#\/schema\/logo\/image\/","url":"https:\/\/adjoe.io\/wp-content\/uploads\/2026\/11\/OG-img-1200x630-1.jpg","contentUrl":"https:\/\/adjoe.io\/wp-content\/uploads\/2026\/11\/OG-img-1200x630-1.jpg","width":1200,"height":630,"caption":"adjoe | Making every interaction the start of lasting value"},"image":{"@id":"https:\/\/adjoe.io\/ko\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/people\/Adjoe\/100076450974671\/","https:\/\/www.instagram.com\/adjoe.io\/","https:\/\/www.linkedin.com\/company\/adjoe"]}]}},"_links":{"self":[{"href":"https:\/\/adjoe.io\/ko\/wp-json\/wp\/v2\/engineer_blog\/2812","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adjoe.io\/ko\/wp-json\/wp\/v2\/engineer_blog"}],"about":[{"href":"https:\/\/adjoe.io\/ko\/wp-json\/wp\/v2\/types\/engineer_blog"}],"author":[{"embeddable":true,"href":"https:\/\/adjoe.io\/ko\/wp-json\/wp\/v2\/users\/63"}],"version-history":[{"count":5,"href":"https:\/\/adjoe.io\/ko\/wp-json\/wp\/v2\/engineer_blog\/2812\/revisions"}],"predecessor-version":[{"id":5665,"href":"https:\/\/adjoe.io\/ko\/wp-json\/wp\/v2\/engineer_blog\/2812\/revisions\/5665"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/adjoe.io\/ko\/wp-json\/wp\/v2\/media\/6199"}],"wp:attachment":[{"href":"https:\/\/adjoe.io\/ko\/wp-json\/wp\/v2\/media?parent=2812"}],"wp:term":[{"taxonomy":"engineer_blog_category","embeddable":true,"href":"https:\/\/adjoe.io\/ko\/wp-json\/wp\/v2\/engineer_blog_category?post=2812"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}