add useful hook for onRender and onShow