This allows the modal to be used anywhere in the component hierarchy, rather than requiring it to be in the top level.