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

Published: 13 May 2022
on channel: 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


Watch video Reviewing changes to the @wordpress/scripts package and trying out Thunks for the first time. online without registration, duration hours minute second in high quality. This video was added by user Ryan Welcher Codes 13 May 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 44 once and liked it 1 people.