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

Discussion: ES5 vs ESNext vs JSX #171

@ryanwelcher

Description

@ryanwelcher

There is an ongoing discussion in the Gutenberg project around how to handle the delineation around ES5, ESNext, and JSX since dropping IE 11 support.

With the dropping of support for IE11, the targeted browsers all support the ES6 syntax. So the distinction is no longer accurate, as it is not between ES5 and a newer syntax; but between not building JavaScript and using JSX that requires a build.

Now that all targeted browsers support ES6, is there a need to maintain examples that use features/syntax required for IE11?

Currently, the ES5 and ESNext examples are using different ESLint standards and this could be simplified by targeting plugin:@wordpress/eslint-plugin/recommended" for all examples.

The major difference between the ES5 and ESNext versions after updating the examples is that ESNext uses JSX while ES5 does not. For reference Example: Basic and Example: Basic (ESNext)

It seems almost redundant to have both versions of that block. Perhaps we condense the example to a single block that uses JSX to match what would be found in the Gutenberg project and we add a README to show how the same thing could be done using non-JSX

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions