Skip to content

Conversation

kyletsang
Copy link
Contributor

Closes #4238

Passes args in the query function to the prepareHeaders call as the third argument.

In the base fetch function, I renamed the first argument from arg to args to make it consistent with the name in the types and docs.

@codesandbox
Copy link

codesandbox bot commented Sep 23, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 23, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 3a22c67:

Sandbox Source
@examples-query-react/basic Configuration
@examples-query-react/advanced Configuration
@examples-action-listener/counter Configuration
rtk-esm-cra Configuration

@netlify
Copy link

netlify bot commented Sep 23, 2024

Deploy Preview for redux-starter-kit-docs ready!

Name Link
🔨 Latest commit 3a22c67
🔍 Latest deploy log https://app.netlify.com/sites/redux-starter-kit-docs/deploys/670d614ff4188700089f4054
😎 Deploy Preview https://deploy-preview-4638--redux-starter-kit-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@markerikson
Copy link
Collaborator

I think I'd probably prefer adding args to the object second argument, rather than passing it as a third argument.

@kyletsang
Copy link
Contributor Author

I think I'd probably prefer adding args to the object second argument, rather than passing it as a third argument.

Thanks for the feedback Mark. I've modified the code to pass into the second args object.

@markerikson
Copy link
Collaborator

Looks like we have uses of both arg and args in the codebase, but more arg usage - args is mostly the name given to the parameter in some thunks.

Given that, I'm going to switch this back to arg.

@markerikson markerikson merged commit d38ff98 into reduxjs:master Oct 14, 2024
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Passing query args to prepareHeaders?

3 participants