“
Centralizing your application’s state and logic enables
powerful capabilities like undo/redo, state persistence,
and much more.
”
redux.js.org/
REDUX WEBSITE
Slide 21
Slide 21 text
Extensibility
ARCHITECTING GUTENBERG
Slide 22
Slide 22 text
“
”
WordPress combines simplicity for users and
publishers with under-the-hood complexity for
developers. This makes it flexible while still being easy-
to-use.
wordpress.org/about/features/
WORDPRESS FEATURES PAGE
“
That’s are clear signs of the Renaissance
for JavaScript. Renaissance was a time
when people became creative, and
JavaScript is currently a place where
creativity thrives.
”
ALEXANDER BELETSKY
medium.com/@alexbeletsky/renaissance-of-javascript-485118447cf9
Slide 32
Slide 32 text
EMBRACING MODERN JAVASCRIPT
JavaScript
Versions
Slide 33
Slide 33 text
( function() {
var el = wp.element.createElement;
var __ = wp.i18n.__;
var registerPlugin = wp.plugins.registerPlugin;
var PluginPostStatusInfo = wp.editPost.PluginPostStatusInfo;
function MyPostStatusInfoPlugin() {
return el(
PluginPostStatusInfo,
{
className: 'my-post-status-info-plugin',
},
__( 'My post status info' )
);
}
registerPlugin( 'my-post-status-info-plugin', {
render: MyPostStatusInfoPlugin
} );
} )();
Slide 34
Slide 34 text
import { __ } from '@wordpress/i18n';
import { registerPlugin } from '@wordpress/plugins';
import { PluginPostStatusInfo } from '@wordpress/editPost';
const MyPostStatusInfoPlugin = () => (
{ __( 'My post status info' ) }
);
registerPlugin( 'my-post-status-info-plugin', {
render: MyPostStatusInfoPlugin,
} );
Slide 35
Slide 35 text
import { __ } from '@wordpress/i18n';
import { registerPlugin } from '@wordpress/plugins';
import { PluginPostStatusInfo } from '@wordpress/editPost';
const MyPostStatusInfoPlugin = () => (
{ __( 'My post status info' ) }
);
registerPlugin( 'my-post-status-info-plugin', {
render: MyPostStatusInfoPlugin,
} );
Slide 36
Slide 36 text
import { __ } from '@wordpress/i18n';
import { registerPlugin } from '@wordpress/plugins';
import { PluginPostStatusInfo } from '@wordpress/editPost';
const MyPostStatusInfoPlugin = () => (
{ __( 'My post status info' ) }
);
registerPlugin( 'my-post-status-info-plugin', {
render: MyPostStatusInfoPlugin,
} );
Slide 37
Slide 37 text
"use strict";
var _element = require("@wordpress/element");
var _i18n = require("@wordpress/i18n");
var _plugins = require("@wordpress/plugins");
var _editPost = require("@wordpress/editPost");
var MyPostStatusInfoPlugin = function MyPostStatusInfoPlugin() {
return (0, _element.createElement)(_editPost.PluginPostStatusInfo, {
className: "my-post-status-info-plugin"
}, (0, _i18n.__)('My post status info'));
};
(0, _plugins.registerPlugin)('my-post-status-info-plugin', {
render: MyPostStatusInfoPlugin
});
Slide 38
Slide 38 text
MODERN JAVASCRIPT
Reusable
Scripts
Slide 39
Slide 39 text
“
”
DAN ABRAMOV
If WordPress were to adopt React, it would
make sense for it to also provide a zero-
configuration build environment. We are
happy to offer some of the packages we
developed as part of Create React App for
reuse.
thedevcouple.com/interview-react-team-facebook-wordpress-gutenberg/
1. Install dependencies: npm install.
2. Start development builds: npm start.
3. Develop. Test. Repeat.
4. Create production build: npm run build.
Development Workflow
Slide 49
Slide 49 text
No content
Slide 50
Slide 50 text
CHAPTER V
Key Takeaways
Slide 51
Slide 51 text
Recommendations
1. ES5 standard is still relevant.
2. ESNext and JSX make your life easier.
3. Reuse pieces of Gutenberg.
4. Use modern JavaScript tools.
Slide 52
Slide 52 text
Learn JavaScript deeply and prosper!
Slide 53
Slide 53 text
Thank You!
Grzegorz (Greg) Ziółkowski @gziolo gziolo.pl