Simple, unobtrusive add-on to support String refs in Preact, without needing to pull in preact-compat.
Calling linkRef(componentInstance, refName)
returns a "ref proxy" function, which sets this.refs[refName]
when called.
import { h, Component } from 'preact';
import linkRef from './linked-ref';