The best news is that the new version is a minimal change to the API, so updating should take less than ten minutes: Upgrade Guide.
If you’re interested to learn more about what’s inside this client, let’s deep dive!
Reduced file size
- Lite version is 4.27 kb gzipped on v4, down from 13.21 kb on v3.
- Default version is 7.44 kb gzipped on v4, down from 19.35 kb on v3.
That amounts to a combined 64% size decrease compared to the previous version.
Also, this new version reduced the number of dependencies from 15 => 0. Yes, that’s right - 0 dependencies. So there is no longer the risk of receiving third-party updates that might break the client.
Brings the DX one step further
We added a bunch of new helpers that aren’t just a simple mapping to API endpoints. Users are now able to
replaceAllObjects with zero downtime, or even
copyIndex between apps, and so much more! Here are some examples:
Some customers have use cases where a complex code is needed, so we are really happy to turn things more easy for them .
In addition, for optimal developer experience and type safety, the new release introduces strong typing as is fully written in TypeScript, so the customer is able to leverage optional static typing and type inference out-of-the-box.
Just like the v3, we ship with two versions: lite and default - those are predefined versions that help the customers to start quickly using the traditional:
But now, thanks to a brand new redesigned architecture, you can build your own version of the client, adjusted to your own needs. Here is an example:
The customer can inject their own requester, their own logger, but also their own cache implementations. Good news is, even if you inject your concrete implementations, everything will still run under our retry strategy.
With this approach, we believe that we will able to answer to advanced use cases of our customers.
You’d like to contribute?
You’d like to contribute? Before start, we want to let you know that your feedback is important to us! Please consider start using this v4 today! Found a bug or see something that can be improved?
You can also contact us or answer to the thread directly.