Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New isMounted function breaks existing code #12

Closed
electerious opened this issue Oct 16, 2019 · 1 comment
Closed

New isMounted function breaks existing code #12

electerious opened this issue Oct 16, 2019 · 1 comment
Labels
wontfix This will not be worked on

Comments

@electerious
Copy link

electerious commented Oct 16, 2019

The newly added isMount function is a breaking change, but has been marked as a feature release. The following code will fail since v2.2.0:

const initialData = { ... }

const fetchSomething = (data = initialData) {
  // Data is now function, but was undefined before
  // The initialData won't be used anymore
}

const onClick = async () => {
  await fetchSomething({ custom: true })
}

useAsyncEffect(fetchSomething, [])

It's now too late, but I just wanted to let you know about this case so you can avoid it in future releases :)

@rauldeheer
Copy link
Owner

Thank you for letting us know! We will try to do it right in the future.

@houfio houfio added the wontfix This will not be worked on label Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants