GithubHelp home page GithubHelp logo

Comments (12)

jsyang avatar jsyang commented on July 19, 2024 7

.interceptors for instance is missing on a redaxios instance

from redaxios.

Pyrolistical avatar Pyrolistical commented on July 19, 2024 6

you are jebaiting people by referring to the axios documentation. that implies this a drop in replacement

from redaxios.

Pyrolistical avatar Pyrolistical commented on July 19, 2024 6

well, then how does one understand what is and is not implemented? you only linked to the axios document, so that would make people assume everything is implemented.

even in the readme you say // use as you would normally, except that's a lie

from redaxios.

developit avatar developit commented on July 19, 2024 5

Aside from uploadProgress and downloadProgress, the goal is to support most/all features. If the size increases too much, it might make sense to provide a lite version that doesn't include configuration inheritance or interceptors. This would be useful for folks who are just using Axios as a simple convenience lib for making network requests.

from redaxios.

developit avatar developit commented on July 19, 2024 3

I doubt the end result is 100% parity, since Fetch is only just now getting progressive upload support spec'd out.

The philosophical goal of this library is not to reduce the size of axios (it's not even that large). It's make it easy to move to Fetch without requiring a refactor. For folks looking to squeeze the size of their code, redaxios still includes a bunch of architectural niceties from Axios that are often unused - moving to a small purpose-built wrapper around fetch should really be the goal.

from redaxios.

FedericoBiccheddu avatar FedericoBiccheddu commented on July 19, 2024 2

I agree, I would state in the docs that this is not a drop-in replacement library.

from redaxios.

developit avatar developit commented on July 19, 2024 2

One part of this that is perhaps worth mentioning is that portions of the differences are just because redaxios is new, and there's still work to do.

from redaxios.

developit avatar developit commented on July 19, 2024 1

@jsyang correct, see #9.

from redaxios.

developit avatar developit commented on July 19, 2024 1

Nowhere in the readme do I state that redaxios is intended to be identical to Axios. That would make the module pointless.

It doesn't make sense to replicate Axios' documentation here, because redaxios is a strict subset of its functionality. A list of compatibility notes would be better, I simply haven't had the time to write it and currently would prefer to spend that time merging the open PRs that ultimately reduce those differences.

I don't think there is any readme text that would address the issue of folks believing that this is somehow a simultaneously
a byte-for-byte identical clone of axios and 80% smaller than axios. There's no magic that makes things free, everything is a tradeoff - pretty much every project I maintain can be considered to have that disclaimer.

from redaxios.

jonyyz avatar jonyyz commented on July 19, 2024 1

This part of the documentation is misleading and open to interpretation. It should be made more explicit what was said above to avoid misinterpretation.

image

from redaxios.

dpikt avatar dpikt commented on July 19, 2024

Potentially philosophical-ish question- if there becomes 100% parity between the two libraries, why would I ever choose to use axios over redaxios?

from redaxios.

FedericoBiccheddu avatar FedericoBiccheddu commented on July 19, 2024

Nowhere in the readme do I state that redaxios is intended to be identical to Axios. That would make the module pointless.

It doesn't make sense to replicate Axios' documentation here, because redaxios is a strict subset of its functionality. A list of compatibility notes would be better, I simply haven't had the time to write it and currently would prefer to spend that time merging the open PRs that ultimately reduce those differences.

I don't think there is any readme text that would address the issue of folks believing that this is somehow a simultaneously
a byte-for-byte identical clone of axios and 80% smaller than axios. There's no magic that makes things free, everything is a tradeoff - pretty much every project I maintain can be considered to have that disclaimer.

Absolutely. My comment was not intended do bash the project or something.

I did comment because in the company where I work, we choose to change axios to redaxios because of what is stated in the readme. These were the selling points for us:

  • Axios has a great API [...] Redaxios provides that API in 800 bytes [...]
  • [...] Redaxios exists so that you can use that same API [...]
  • import axios from 'redaxios';
  • // use as you would normally

Based on those points, seems that redaxios IS a drop-in replacement.

I will prepare a PR with compatibility notes.


Anyway, thank you for your time and the library.
We are still currently using redaxios in production, but axios if we need onUploadProgress.

from redaxios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.