"Can you open that button/link in a new tab?" can send (ultimately good) shockwaves through your app state:

- How easy is it for you to put that state in the URL?
- Is it complex/nested?
- Is it type safe?
- Can you update some/all of it?
- While also changing the path/hash?
- Is that state stable between renders?
- Do all routes/paths now need to be aware of that state?
- When do you persist that state automatically? Can you?
- If you update only part of that state, are the parts that remained the same structurally equal?
- How much global/route-level/usage-level control do you have over the links that you are generating?
- Can you apply defaults to said URL state? On specific pages?
- Can you validate the end-resulting URL for correctness?
- Can you fix it if it's not?
These questions are running through my head *all day* and have become indispensable, especially with the work I do on @nozzleio.

@tan_stack's #ReactLocation isn't perfect, but I feel like it has pretty good answers and solutions to all of these questions.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Tanner Linsley ⚛️ Nozzle.io Rules!!! 💪

Tanner Linsley ⚛️ Nozzle.io Rules!!! 💪 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @tannerlinsley

Nov 15, 2021
🎉🥳 Announcing #ReactLocation, a brand new router for React!

⏳ Async Loaders & Elements
🔀 Parallelized
⏲️ Prefetching
🗄 Caching
🔎 1st-class Integrated Search Params API
🗂 Code-Splitting
⚠️ Error/Pending/Timing States
🪆 Nested Layouts

react-location.tanstack.com

#TanStack
⏳ Async Route Loaders & Elements

Routes can define data dependencies and the elements they render as asynchronous functions that will be guaranteed to resolve before rendering the next location. The suspense is palpable! 😜
🔀 Parallelized Loaders

"🎶 Don't go chasing waterfalls", not even the data-fetching ones!

Navigating through 3 loaders to a deep link out of the gate? By default, loaders and async elements for matched routes are all parallelized for efficiency. You can fetch serially, too 🤷‍♂️
Read 16 tweets
Jul 15, 2020
@theefer @OliverJAsh I’ll respond more at my keyboard, but the simple solution to this is to adopt invalidation patterns over manual data normalization. Just invalidate all of the queries. They already know how to fetch the exact data they need.
@theefer @OliverJAsh Regardless of React Query or not, normalized caches on the front-end come with the upside of fetching less data and using the responses of mutations as much as possible. When you like a tweet, you just go find that tweet in your store and update it

...
@theefer @OliverJAsh This situation works fine if that action doesn't have any side effects on the rest of the system. Imagine tweet deck that is showing only liked tweets, or a list that is sorted by time of liking. This now means that you either have to replicate all of the logic on your server

..
Read 11 tweets
Jul 9, 2020
Lots of talk about React suspense today. I’m very excited about it.

However, I feel like the patterns I’ve seen in #ReactQuery (and friends like SWR) have alone been more transformative for my own dev process and users and have even prepped me for suspense in a lot of ways.
Of course, Suspense isn’t out yet, and the ecosystem will likely experience a smash of collective inovation around it when it comes out. That’s the exciting part. But what I feel like I’m starting to realize after playing around with it is that in the end,
The biggest thing that suspense is going to do for me is just one thing: avoiding that flash of loading/placeholder for newly mounted components. Suspense doesn’t fetch, it doesn’t codesplit, it doesn’t preload for you and it doesn’t cache for you.
Read 11 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(