New hooks version resolves an issue with promises