The context here is really bad, if you view the full changes, I wrapped the creation of the provider and adding it as a child to the Provider.root in the if statement to prevent adding it multiple times as a child.