In React, each component can render only a single element. At the moment, there’s no way to return a multiple elements from a component’s
However, if you need to render multiple components anywhere else, here are 2 solutions.
Returning Multiple Elements as an Array
It’s good practice to use helper methods or functions to generate part of your component. It’s common to want to return multiple elements from your helper method without a wrapper…
What is progressive loading?
“Progressive loading” can mean many different things. Generally, it means partially loading something first, then loading the rest later. In this article, “progressive loading” refers to loading HTML in chunks.
PHP uses buffers to improve efficiency. Buffers batch up PHP output so your server can send fewer responses. Without buffers, your server would have to send a response each time PHP generates output (e.g. by calling
Why wait for 0 milliseconds? Why not just call
The answer is that this
doSomething could run almost immediately or it could run seconds later…
Promises and RxJS
Promises solve Ajax callbacks very well. Remember the days when you had to handle multiple parallel Ajax requests with callbacks. How did you handle it if one fails? It probably wasn’t pretty…
WordPress has pretty good on-page SEO by default, but an SEO plugin will help make it even better. SEO plugins let you customize your title format, add social media meta tags, add structured data, and lots more. Here are 4 of the best WordPress SEO plugins.
Yoast is the most popular WordPress SEO plugin and it was the standard SEO plugin that everyone used and loved. However, I find that Yoast is bloated with features that I don’t need…
Favicons are the icons displayed on browser tabs. They help form the identity and brand of a WordPress blog.
App icons are a way to help bridge web apps and mobile apps. On popular mobile browsers such as Chrome and Safari, you can add shortcuts to webpages on your homescreen. These shortcuts look like apps, but they’re essentially bookmarks. Mobile browsers use your blog’s app icons as the icons for these shortcuts…
WordPress allows you to write comments on media attachment pages by default. Since attachment pages contain only the attachment, it’s unlikely that people will write comments on them. The snippet below disables comments on attachment pages:
$is_open is already
false, this doesn’t fetch the post…
WordPress’s TinyMCE editor makes all links use absolute URLs with your blog’s
siteurl as the base. Your blog’s
siteurl is the value in Settings > General Settings > WordPress Address (URL). This value is hardcoded in your posts. This means that if you change your domain, change your permalink structure, or switch from http to https, you’ll have to update your posts. Also, you cannot support both http and https; you have to choose one…