Comments (3)
My 2 cents: I don't think there's enough going on in any of these minimal fetch wrappers to make a measurable difference in runtime performance. Requesting, downloading and parsing network requests is always going to take many orders of magnitude longer than merging a few objects and firing some events.
I wasn't aware of this library, but I like the events it fires and use something very similar in all of my stuff (and I keep writing them one-off every time...)
from thwack.
And I wasn't aware of @developit's redaxios. It's tiny.
As Jason has said, performance is going to be roughly the same, no matter what package you use. thwack@next
is going to have a more robust addEventListener
interface, with multiple level request mocking, replacing, blocking, etc, but probably not needed by most users.
redaxios is a good ultra-minimal alternative, although not 100% axios compatible (lacking interceptors
), but again, probably not needed by most apps.
BTW, I have a TODO to look into using the EventTarget interface to lower my overhead.
from thwack.
@donavon sounds like some nice improvements.
RE EventTarget - I've tried a bunch of different techniques for reusing it as a generalized event interface, and never found a way that was materially better than a tight first party implementation. I'd have to peek at the code again to see how yours is implemented, but you might be able lift the optimizations from mitt, which should be about as small as you can get in JS.
from thwack.
Related Issues (9)
- Abort requests in nodejs HOT 3
- Types aren't detected when importing thwack/node HOT 5
- Photos
- "Thwack: Invalid options object during request." on simple GET HOT 5
- PATCH requests are blocked by CORS policy
- How can i cancel request, and listen to canceled event and use it with react hooks like logging example HOT 4
- ThwackResponse should consume data type HOT 8
- add all contributors bot HOT 20
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thwack.