January 2023

  • WordPress Blocks: Hydrate InnerBlocks From HTML

    Hydrate InnerBlocks From HTML. For instance if your block pulls information from a remote API and you want to display as part of the post, or embed in the post such that it’s editable. The block editor already handles the job very simply

  • WordPress Blocks: React Context Cuts Clutter

    Using Reacts’ Context in WordPress blocks passes parameters painlessly. Attributes carried by context keep coupling minimal. Reacts’ Context feature facilitates distributing data down a component tree to any descendant component. Instead of passing attributes between your components manually (e.g. <FooComponent attrib={ attrib }>), which tightly couples the current attributes and components, using a block-level context…