Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid use of useCallback #260

Merged
merged 1 commit into from
Feb 14, 2024
Merged

Conversation

mboynes
Copy link
Contributor

@mboynes mboynes commented Feb 14, 2024

setBylineMeta() is a higher-order function, and was previously called using,

const saveByline = setBylineMeta(dispatch, metaKey);

When we added useCallback, it inadvertently added a function layer, leading to setBylineMeta() not actually being called. This ultimately meant that bylines were not updated when saving a post.

Using useCallback in this way inadvertently added a callback layer, leading to setBylineMeta() not actually being called. This meant that bylines were not updated when saving a post.
Copy link
Member

@kevinfodness kevinfodness left a comment

Choose a reason for hiding this comment

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

🍣

@mboynes mboynes merged commit 17d0c73 into production Feb 14, 2024
8 checks passed
@mboynes mboynes deleted the hotfix/usecallback-error branch February 14, 2024 22:25
alley-ci pushed a commit that referenced this pull request Feb 14, 2024
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.

2 participants