Reviewing changes to the @wordpress/scripts package and trying out Thunks for the first time.

Опубликовано: 13 Май 2022
на канале: Ryan Welcher Codes
442
12

In this video, originally streamed on May 12, 2022, we look at the new changes to the @wordpress/scripts package that make using it much easier for developers. We then get into using Thunks in the datastore created for the pre-publish checklist.

00:00 Intro
00:51 @wordpress/scripts package natively supports multiple blocks
02:59 Scaffold a block using @wordpress/create-block
04:44 Error with Node version 18. This has been fixed since!
06:17 Reviewing the scaffolded files
06:59 Explaining how the scripts package knows there are multiple blocks
10:56 Updating the copied block files to be registered correctly.
11:08 Figuring out why the blocks aren’t registering.
17:55 Look at the new flags added to the @wordpress/scripts package
18:10 Using the —webpack-src-dir flag to customize the src directory name
23:53 Using the --webpack-copy-php flag to copy PHP files into the build directory
29:58 Trying out thunks
43:43 Setting up a resolver to use thunks
45:49 Setting __experimentalUseThunks to true to enable thunks in a datastore. This will be the default in WordPress 6.0
56:02 Updating getUserPreferences to use a thunk.
58:57 Setting up a selector that selects and dispatches.
01:07:23 Setting up a generic setSettings action

Music: Philanthrope, mommy - Burgundy https://chll.to/bc9c5cfe

#Gutenberg #WordPressPluginDevelopement #WordPressBlockDevelopment


Смотрите видео Reviewing changes to the @wordpress/scripts package and trying out Thunks for the first time. онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Ryan Welcher Codes 13 Май 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 442 раз и оно понравилось 12 людям.