Skip to content

Conversation

pikax
Copy link
Owner

@pikax pikax commented Mar 27, 2020

Changes the behaviour of usePromise, before usePromise was lazy, it would be only executed once exec is called, now it will be executed straight away.

second argument of usePromise also changes from throwException to lazy

New composable added usePromiseLazy, just a sugar for usePromise with lazy: true

//implementation of usePromiseLazy

function usePromiseLazy(fn, throwException) {
  return usePromise(fn, {
    lazy: true,
    throwException
  });
}

@pikax pikax merged commit 57c24d1 into master Mar 27, 2020
@pikax pikax deleted the feat/promise_execution branch March 27, 2020 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant