adding a method to rerender a component on parent resize