Skip to content

Conversation

@soofstad
Copy link
Owner

What does this pull request change?

  • Export a new function useAuthContext that will throw an error if no parent node is the AuthProvider

Why is this pull request needed?

  • Helps the developer to notice wrong usage of the AuthContext
  • More concise syntax

Issues related to this change

none

@soofstad soofstad force-pushed the feat/throw-if-context-used-outside-of-provider branch from dd1db2e to 48a7f6b Compare November 12, 2025 12:23
@soofstad soofstad marked this pull request as ready for review November 12, 2025 12:23
@soofstad soofstad force-pushed the feat/throw-if-context-used-outside-of-provider branch from 48a7f6b to 400bdb2 Compare November 12, 2025 12:25
Copy link
Collaborator

@sebastianvitterso sebastianvitterso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, this is what we've been doing in all our projects already, so very nice!

@soofstad soofstad merged commit 15b5f00 into main Nov 24, 2025
6 checks passed
@soofstad soofstad deleted the feat/throw-if-context-used-outside-of-provider branch November 24, 2025 07:42
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.

3 participants