Skip to content

Conversation

@denny-ddfe
Copy link

Refactor LoginForm to remove useEffect and handle login directly in submit function. Update import statement to suit.

Reasoning: I don't see much benefit in useEffect here. The function returned by useMutation can be awaited for the result, so the setting of the token and saving to localStorage can both be handled inside the submit function.

Refactor LoginForm to remove useEffect and handle login directly in submit function. Update import statement to suit.
@vejol vejol added the part 8 label Nov 27, 2025
@vejol vejol added this to the Part 8 - yearly check 2025 milestone Nov 27, 2025
@vejol vejol changed the title Refactor LoginForm component Part8d: Refactor LoginForm component Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants