![]() ![]() If blocks were Angular or something, I feel like I might not have even given it a shot. Building blocks with both technologies together feels decently natural to me. I have one foot in WordPress development and just so happen to have one foot in React development. ![]() I’ve used create-guten-block for the handful of custom blocks I’ve made so far, and have found it a pretty nice experience.īut… I feel like I just sort of lucked into being comfortable with all this. Setting it up is fairly straightforward, and it’s similar to Create React App. It gives you a lot of the boilerplate stuff you need out of the box, like Webpack, ESNext support etc. You can also use the ‘create-guten-block’ tool by Ahmad Awais. Modern JavaScript allows us to write more concise code and use JSX in our custom block code. The only drawback that I noticed is that the JavaScript uses the old ES5 syntax rather than modern ESNext. This command will set up a WordPress theme or plugin with a ‘blocks’ folder that contains the PHP and base CSS and JavaScript required to create a custom block. It’s fairly straightforward these days to get set up with the WP CLI ‘scaffold’ command. Peter Tasker on creating blocks right now: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
February 2023
Categories |