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

refactor(vanilla, react): change exported functions to 'function declarations' and non-exported ones to 'arrow functions' #3002

Merged
merged 3 commits into from
Feb 26, 2025

Conversation

sukvvon
Copy link
Contributor

@sukvvon sukvvon commented Feb 25, 2025

Summary

Check List

  • pnpm run fix for formatting and linting code and docs

Copy link

vercel bot commented Feb 25, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
jotai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 26, 2025 0:54am

@sukvvon sukvvon changed the title refactor(react): replace 'arrow function' to 'function declartion' for consistency refactor(vanilla, react): replace 'arrow function' to 'function declartion' for consistency Feb 25, 2025
Copy link

codesandbox-ci bot commented Feb 25, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link

pkg-pr-new bot commented Feb 25, 2025

Open in Stackblitz

More templates

npm i https://pkg.pr.new/jotai@3002

commit: 20d548a

Copy link

github-actions bot commented Feb 25, 2025

LiveCodes Preview in LiveCodes

Latest commit: 20d548a
Last updated: Feb 26, 2025 12:53am (UTC)

Playground Link
React demo https://livecodes.io?x=id/DD986KBRZ

See documentations for usage instructions.

Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

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

Thanks for the suggestion. However, the coding style is slightly different. If you want to make it consistent, please follow this rule:

  • for exported functions, use function declaration
  • for other functions, use const arrow function (and omit return statements if possible.)

@sukvvon sukvvon force-pushed the refactor/core-arrow-to-function branch from 52a86e4 to 20d548a Compare February 26, 2025 00:53
@sukvvon sukvvon changed the title refactor(vanilla, react): replace 'arrow function' to 'function declartion' for consistency refactor(vanilla, react): change exported functions to 'function declarations' and non-exported functions to 'arrow functions' Feb 26, 2025
@sukvvon sukvvon requested a review from dai-shi February 26, 2025 00:56
@sukvvon sukvvon changed the title refactor(vanilla, react): change exported functions to 'function declarations' and non-exported functions to 'arrow functions' refactor(vanilla, react): change exported functions to 'function declarations' and non-exported ones to 'arrow functions' Feb 26, 2025
Copy link
Member

@dai-shi dai-shi 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!

@dai-shi dai-shi merged commit 268ab95 into pmndrs:main Feb 26, 2025
44 checks passed
@sukvvon sukvvon deleted the refactor/core-arrow-to-function branch February 26, 2025 01:37
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