Making the Best of Config
Over the last half year, I have been looking into several of project repositories on GitHub, and I came across quite a few different ways of configuring (and using) various tools and services. In this post, I would like to share some simple, yet effective suggestions that, in my opinion, make for a much easier […]
Conditional Component Composition
In this post, I would like to share two related things that I have developed in the course of a recent client project: ConditionalComponent and composeIf. Conditional Components Sometimes there is the need to render one component or another, based on some condition or context. This is usually done by either an early return or […]
ABC – The Look of Love (in Code)
No, sorry, this is not about the song. But well, while you’re all here, why not start it in the background, and continue reading…? 😅 CONFLICT (some-branch): Merge conflict in some/file.here Over and over again, I encountered merge conflicts due to several people adding stuff to some kind of list by simply appending whatever they […]
How to Set up Modern PHP Coding Standards for WordPress
This post explains how to write WordPress code following modern PHP best practices, adhering to the official (or other established) coding standards.
How to Register Custom Block Categories in JavaScript
As you might know, the WordPress Block Editor (aka Gutenberg) makes use of Block Categories to structure the various registered blocks. This can be seen, for example, in the Block Picker: Now, what we often want or have to do is to register a custom block category. And that’s possible. The official way to do […]
How to Test Container Components in React
Assuming you would want to unit-test container components in React (i.e., connected components in a Redux-based project), or any component that is wrapped in a higher-order component (HOC) etc. really, here’s a simple thing you should always do: 👉 Also export the “naked” component! I am talking about something like this: // … export { […]
Three Things You Should Know About WordPress Filters
Oftentimes, people are using WordPress filters in a wrong way. This post tries to educate people on how to correctly filter data.
Event Listeners and Business Logic
In this post, I want to share a simple, yet effective best practice when it comes to (JavaScript) event listeners, and code reuse.
On PHP Language Constructs and Parentheses
What are PHP language constructs, why do they exist, and what are they good for? And what’s the issue with parentheses? Well, here are some answers to that.
Interview with Wes Bos about WordPress, JavaScript and React
I did an interview with JavaScript and, in particular, React mastermind Wes Bos about a possible future of WordPress and the JavaScript framework React.