Add an onRendered callback