Skip to content

Commit

Permalink
Docs: Update wording in Block Editor Handbook to reflect that all exa…
Browse files Browse the repository at this point in the history
…mples now use JSX (#56315)

Co-authored-by: atachibana <atachibana@git.wordpress.org>
Co-authored-by: juanmaguitar <juanmaguitar@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: fabiankaegy <fabiankaegy@git.wordpress.org>
  • Loading branch information
5 people committed Apr 17, 2024
1 parent b29c95b commit fb4d29d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/getting-started/devenv/get-started-with-wp-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The [`@wordpress/scripts`](https://developer.wordpress.org/block-editor/referenc

A JavaScript build step refers to the process of transforming, bundling, and optimizing JavaScript source code and related assets into a format suitable for production environments. These build steps often take modern JavaScript (ESNext and JSX) and convert it to a version compatible with most browsers. They can also bundle multiple files into one, minify the code to reduce file size and perform various other tasks to optimize the code.

You will typically be working with ESNext and JSX when building for the Block Editor, and most examples in the Block Editor Handbook are written in these syntaxes. Learning how to set up a build step is essential. However, configuring the necessary tools like [webpack](https://webpack.js.org/), [Babel](https://babeljs.io/), and [ESLint](https://eslint.org/) can become complex. This is where `wp-scripts` comes in.
You will typically be working with ESNext and JSX when building for the Block Editor, and all examples in the Block Editor Handbook are written in these syntaxes. Learning how to set up a build step is essential. However, configuring the necessary tools like [webpack](https://webpack.js.org/), [Babel](https://babeljs.io/), and [ESLint](https://eslint.org/) can become complex. This is where `wp-scripts` comes in.

Here are a few things that `wp-scripts` can do:

Expand Down
2 changes: 1 addition & 1 deletion docs/how-to-guides/platform/custom-block-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ By the end of this article, you will have a solid understanding of the block edi

## Code syntax

The code snippets in this guide use JSX syntax. However, you could use plain JavaScript if you prefer. However, once familiar with JSX, many developers find it easier to read and write, so most code examples in the Block Editor Handbook use this syntax.
The code snippets in this guide use JSX syntax. However, you could use plain JavaScript if you prefer. However, once familiar with JSX, many developers find it easier to read and write, so all code examples in the Block Editor Handbook use this syntax.

## What you're going to be building

Expand Down
3 changes: 0 additions & 3 deletions docs/reference-guides/block-api/block-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,6 @@ Attribute definition:

From here, meta attributes can be read and written by a block using the same interface as any attribute:


{% JSX %}

```js
edit( { attributes, setAttributes } ) {
function onChange( event ) {
Expand Down

0 comments on commit fb4d29d

Please sign in to comment.