Pass $render to closure