Skip to content

Commit

Permalink
Add reducerPath property in creation of api
Browse files Browse the repository at this point in the history
  • Loading branch information
jomarquez21 committed Sep 30, 2021
1 parent 4fbd29f commit b4a5aed
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/rtk-query/usage/migrating-to-rtk-query.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ import { Pokemon } from './types'

export const api = createApi({
baseQuery: fetchBaseQuery({ baseUrl: 'https://pokeapi.co/api/v2/' }),
reducerPath: 'pokemonApi',
endpoints: (build) => ({
// highlight-start
getPokemonByName: build.query<Pokemon, string>({
Expand Down

0 comments on commit b4a5aed

Please sign in to comment.