Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Migrate authentication logic from react context to redux store #387

Open
Assignees
Kanakanajm
Labels
RefactoringRestructuring and improving existing code
@Kanakanajm

Description

@Kanakanajm

Description

Since the authentication logic is contained withing theAuthProvider, accessing access token requires theuseContext hook. React forbids using hook outside of a function component. That said, we cannot get the token in our services (rtk queries). The workaround currently is to pass the token to the query/mutation function as a parameter which is not ideal due to duplicated code. Instead of using native react context, we can store authentication info in a redux slice and consume the state by callinggetState when defining any query/mutation.

Metadata

Metadata

Assignees

Labels

RefactoringRestructuring and improving existing code

Type

Projects

  • Status

    📋 Product Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp