New Features
Reduced bundle size with custom networking library
Resource comes with a default fetch()
implementation to make getting started easy.
It uses superagent as the networking library
due to its server-side support as well as nice interface via the builder pattern.
However, this comes at the cost of 6kb gziped added to the bundle. For those who want
to use another networking library this is quite a cost to pay for a library that itself
is well under 10kb gzip.
To solve this problem there is a new exported called SimpleResource
. This provides
all the Resource behavior without the fetch()
implementation. If you're customizing
fetch()
or want to customize fetch()
, simply follow the instructions to use
SimpleResource as your base class now. With tree-shaking this will leave superagent
out of your bundle and save a cool 6kb gzip.
Enable customizing networking library reducing bundle size #113