Renames setProps to swapProps and adds documentation