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

[scm] clean up git-commands methods declared as properties #5264

Closed
akosyakov opened this issue May 27, 2019 · 2 comments · Fixed by #5416
Closed

[scm] clean up git-commands methods declared as properties #5264

akosyakov opened this issue May 27, 2019 · 2 comments · Fixed by #5416
Assignees
Labels
git issues related to git quality issues related to code and application quality scm issues related to the source control manager

Comments

@akosyakov
Copy link
Member

akosyakov commented May 27, 2019

It makes sense only if they are used as React callbacks which is not the case.

cc @vinokurig

@akosyakov akosyakov added quality issues related to code and application quality git issues related to git scm issues related to the source control manager labels May 27, 2019
@vinokurig
Copy link
Contributor

@akosyakov Could you please clarify what is the problem, is it related to #5256?

@akosyakov
Copy link
Member Author

It's minor. You don't need to look into it immediately.

Here for example:
https://github.com/theia-ide/theia/blob/89f71edc4b417b8ce717897018c2aa1210435cd4/packages/git/src/browser/git-commands.ts#L166-L169

openFile method is declared as a property, it is not necessary, it can be just a method. Such pattern should be only used to pass functions by a reference into react event handlers to improve performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
git issues related to git quality issues related to code and application quality scm issues related to the source control manager
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants