Load script after block is inserted

I ended up putting an empty svg in an img tag with an onload event. This is probably not ideal, but it does work.

<img // onload hack fires when block is added
  className="onload-hack-pp"
  height="0"
  width="0"
  onLoad={ onBlockLoad }
  src="data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox='0 0 1 1' %3E%3Cpath d=''/%3E%3C/svg%3E"
/>

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)