detachTest test case for detaching an element, re-attaching the element then updating the state on the re-attached element