Skip to content

Ternary Operator Issue #14

@t2e0j0a4

Description

@t2e0j0a4

It's not a major issue but in your component instead of

{this.state.outputFileName ? (
              <button
                type="button"
                className=" btn btn-dark"
                onClick={e => this.click(e)}
              >
                Compress
              </button>
            ) : (
                 <></>
            )}

you can use

{this.state.outputFileName && (
              <button
                type="button"
                className=" btn btn-dark"
                onClick={e => this.click(e)}
              >
                Compress
              </button>
            )}

Yet both are same functionality , code looks goods without empty fragments .
Same issue in some else part of code too.

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