React-query: Some examples from documentation are not working

Created on 7 Oct 2020  路  3Comments  路  Source: tannerlinsley/react-query

Describe the bug
Some examples from documentation are not working

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://react-query.tanstack.com/docs/examples/simple or https://react-query.tanstack.com/docs/examples/basic
  2. See error on Browser preview

Expected behavior
It should work and show examples.

Additional context
I know that this is on codesandbox but reporting it since it would be really nice that examples work for developers and reputation as well.

Most helpful comment

We're working on it. Semantic release is difficult sometimes :)

All 3 comments

I think this has todo with the latest releases. According to npm, the latest release is 2.23.1, next would be 2.24.0-next.8 and beta is 2.25.0.

However, if you open the examples (I had to open them in a private tab, probably due to caching), they try to download ^2.21.2, which then resolves to 2.25.0 :/

If I try going that range (^2.21.2) in https://semver.npmjs.com , it says the latest release to resolve to is 2.23.1, which seems correct:

Screenshot 2020-10-07 at 21 06 56

So I'm not sure - is this a codesandbox issue trying to resolve the wrong version?

Anyways, as a workaround, you can set the dependency of react-query to 2.23.1 and then it works again.

@tannerlinsley I think it's quite confusing to have next and beta releases in the 2.x range - any chance we could make them be 3.0.0-beta1 or so?

We're working on it. Semantic release is difficult sometimes :)

This should be fixed now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tiagofernandez picture tiagofernandez  路  3Comments

the133448 picture the133448  路  4Comments

bgazzera picture bgazzera  路  4Comments

jackmellis picture jackmellis  路  5Comments

benediktviebahn picture benediktviebahn  路  4Comments