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: append async keyword when replace async func with useCallback #48

Merged
merged 5 commits into from
Oct 22, 2024

Conversation

fossamagna
Copy link
Contributor

@fossamagna fossamagna commented Oct 4, 2024

Description

the following code

const Component = () => {
  const myFn = async () => [];
  return <Child prop={myFn} />;
}

disappear async keyword when fixed

import { useCallback } from 'react';

const Component = () => {
  const myFn = useCallback(() => [], []);
  return <Child prop={myFn} />;
}

Checklist

  • Tests: I have created multiple test case scenarios for my changes.
  • Passing Tests: All existing and new tests are passing.
  • Version Bump: I have increased the package version number in package.json following the Semantic Versioning (SEMVER) standard.
  • Focused Changes: My code changes are focused solely on the matter described above.

Additional Information

n/a

@fossamagna
Copy link
Contributor Author

Hi @arthurgeron , Cloud you review this pull request ?

@arthurgeron
Copy link
Owner

Hi @arthurgeron , Cloud you review this pull request ?

Hey, I was focused on Fuel Lab's Mainnet launch. Now I'll have more time to take care of this project.. Will launch a review soon.

Copy link
Owner

@arthurgeron arthurgeron left a comment

Choose a reason for hiding this comment

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

LGTM, just need to add more tests to be safe.

__tests__/require-usecallback.test.ts Show resolved Hide resolved
Copy link
Owner

@arthurgeron arthurgeron left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@arthurgeron arthurgeron merged commit e47bb4d into arthurgeron:main Oct 22, 2024
5 checks passed
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