Skip to content
This repository was archived by the owner on Jun 14, 2023. It is now read-only.
This repository was archived by the owner on Jun 14, 2023. It is now read-only.

User interface -> Commands example simplification #63

@VStankoV

Description

@VStankoV

Hey @marcusolsson!
Thank you for this great tutorial! Excellent job!
Below is a small suggestion to reduce slightly cognitive load.

checkCallback: (checking: boolean) => {
const value = getRequiredValue();
if (value) {
if (!checking) {
doCommand(value);
}
return true
}
return false;

would be easier to understand the logic behind this example if on line 58 we just return value; and remove line 55:

  checkCallback: (checking: boolean) => {
    const value = getRequiredValue();
    if (value) {
      if (!checking) {
        doCommand(value);
      }
    }
    return value;
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions