From a94f035436c15e3bb791fc039ffafbf331208294 Mon Sep 17 00:00:00 2001 From: Reed <3893871+dharit-tan@users.noreply.github.com> Date: Tue, 13 Jun 2023 19:10:38 -0400 Subject: [PATCH] audius-query debug flag usage in README (#3586) --- packages/common/src/audius-query/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/common/src/audius-query/README.md b/packages/common/src/audius-query/README.md index 9918df8c009..d9c9201d9bd 100644 --- a/packages/common/src/audius-query/README.md +++ b/packages/common/src/audius-query/README.md @@ -185,7 +185,7 @@ getTrackById: { ## Debugging -- [createApi.ts](./createApi.ts) contains the implementation of the fetch hooks. You can put breakpoints in `useQuery`. Tip: conditional breakpoints are especially useful since the core logic is shared across every audius-query hook. Try `endpointName === 'myEndpoint && fetchArgs === { ...myArgs }'` to scope down to only your own hook +- [createApi.ts](./createApi.ts) contains the implementation of the fetch hooks. You can put breakpoints in `useQuery`. Tip: conditional breakpoints are especially useful since the core logic is shared across every audius-query hook. When debugging, set `debug: true` in `hookOptions` at your hook callsite, then set `hookOptions.debug === true` as the breakpoint condition. Can also try `endpointName === 'myEndpoint && fetchArgs === { ...myArgs }'`. - Redux debugger - all the data is stored in `state.api['reducerPath']`, and actions are named per endpoint: - `fetch${capitalize(endpointName)}Loading` - `fetch${capitalize(endpointName)}Succeeded`