document transition hook context