Jake Paris

WordPress Block Editor Development Cheat Sheet

Module Location Reference

I often can’t remember which of these things lives in which package. Note that there are two ways to import these into your block. Either during the build process which looks like:

import {
} from '@wordpress/components';

or at run time using the global wp and destructuring which looks like:

const {
} = wp.components;

I used to use the global wp method all the time under the impression that importing all the various component dependencies into my block would bloat the code uneccessarily. However, I did some testing to this end, and really couldn’t find any difference in the size of the compiled script or the speed of anything. I don’t understand that, but there it is.


  • createBlock
  • rawHandler
  • registerBlockType




  • dispatch
  • select
  • withSelect



  • Component
  • Fragment


Note, if importing from `wp.serverSideRender`, instead of `@wordpress/server-side-render`, you have to rename the import to begin with a capital. So:

import { 
    serverSideRender: ServerSideRender 
} from window.wp.serverSideRender;
  • ServerSideRender