MyGit

v3.6.0

apollographql/apollo-client

版本发布时间: 2022-04-27 05:06:52

apollographql/apollo-client最新发布版本:v3.12.0-alpha.0(2024-10-02 04:16:11)

Note: for the most up-to-date version of this information, see CHANGELOG.md

Apollo Client 3.6.0 (2022-04-26)

Potentially disruptive changes

React 18

In both its peerDependencies and its internal implementation, Apollo Client v3.6 should no longer prevent you from updating to React 18 in your applications.

Internally, we have refactored useQuery and useLazyQuery to be implemented in terms of React's new (shimmable) useSyncExternalStore hook, demonstrating Apollo Client can serve as an external store with a referentially stable, synchronous API, as needed by React.

As part of this refactoring, we also improved the behavior of useQuery and useLazyQuery when used in <React.StrictMode>, which double-renders components in development. While this double-rendering always results in calling useQuery twice, forcing Apollo Client to create and then discard an unnecessary ObservableQuery object, we now have multiple defenses in place against executing any network queries for the unused ObservableQuery objects.

In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling our server-side rendering utilities (getDataFromTree et al.), and introducing suspenseful versions of our hooks, to take full advantage of the new patterns React 18+ enables for data management libraries like Apollo Client.

Improvements

New Contributors

相关地址:原始地址 下载(tar) 下载(zip)

查看:2022-04-27发行的版本