question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UPCOMING VERSION v3.0.0 - integrating itty-router-extras into itty-router

See original GitHub issue

So this is a rather big shift/departure from the previous setup, but here are the reasons:

  • I use itty-router-extras 100% of the time with itty, and i’m sure many others would too
  • currently, without examples using extras in the core lib docs, itty-router looks more verbose than it needs to
  • all extras will be released under submodules, allowing the core lib to remain tiny, and the whole project easily tree-shakeable
    • REQUEST FOR FEEDBACK: regarding this, I’m debating an ultra-simplistic itty-router/extras catch-all, or more specific submodules like itty-router/response and itty-router/cors and itty-router/middleware. Honestly, they’re probably all lightweight enough to keep all together for simplicity of end user code… feedback welcome on this though.
  • I prefer simplicity in final code implementation above all, and having one dependency of a rather-coupled system (like itty and extras) makes sense over two deps at this stage
  • itty-router-extras has not changed appreciably in over a year, suggesting that it’s actually a rather stable API

Thoughts?

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:4
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
eugene1gcommented, Apr 8, 2022

I don’t expect people to be as sensitive to the bundle size for Cloudflare Workers as we are with SPAs. One dependency with many exports feels more approachable, and people who are super sensitive to the size might be able to do tree-shaking during the bundling process to remove unused code

1reaction
kwhitleycommented, May 13, 2022

Do you plan to add TypeScript types for itty-router-extras, or rewrite in TS?

For those, I plan to rewrite in TS… just easier than maintaining type files separately.

Read more comments on GitHub >

github_iconTop Results From Across the Web

kwhitley/itty-router-extras - GitHub
ThrowableRouter - this is an auto-magic convenience wrapper around itty-router that simply adds automatic exception handling (with automatic response), rather ...
Read more >
egghead.io PRO member lessons - Podcast Addict
egghead.io PRO member lessons - via Podcast Addict | Bite-sized web development lessons to feed your hungry brain.
Read more >
User - types
@types/bucks (latest: 0.8.29) TypeScript definitions for bucks.js 0.8.3 ... @types/path-to-regexp (latest: 1.7.0) Stub TypeScript definitions entry for ...
Read more >
sitemap.4.xml
... 0.0 https://yarnpkg.com/en/package/stream-to-generator ... 0.0 https://yarnpkg.com/en/package/next-cssr 2020-06-01T04:03:37.802Z 0.0 ...
Read more >
Kevin R. Whitley itty-router Issues - Giters
Question: Grouping - router.route(), to have certain routes in different files ... UPCOMING VERSION v3.0.0 - integrating itty-router-extras into itty-router.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found