Skip to content

Setup axios instance from env and use in thunk middleware - #11

Open
theAshbringer wants to merge 4 commits into
mainfrom
feature/api-url
Open

Setup axios instance from env and use in thunk middleware#11
theAshbringer wants to merge 4 commits into
mainfrom
feature/api-url

Conversation

@theAshbringer

Copy link
Copy Markdown
Owner

Description

This PR introduces a centralized axios API instance configured with the baseUrl taken from environment variables. The instance is injected into Redux thunk middleware via the extraArgument parameter, enabling consistent and reusable API calls within thunks.

Changes

  • Created an axios instance with base URL from webpack env
  • Passed the axios instance as an extra argument to thunk middleware
  • Updated loginByUsername action to use the injected axios instance for API requests

@theAshbringer theAshbringer self-assigned this Sep 8, 2025
@theAshbringer theAshbringer added the enhancement New feature or request label Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant