Twitter | Search | |
Dan Abramov
My React Hook tip: don’t hurry converting your existing patterns! Data fetching is awkward without Suspense. If you fetch data in useEffect you’ll be frustrated I think. Wait for Suspense.
Reply Retweet Like More
Sophia Shoemaker 👠 Oct 29
Replying to @dan_abramov
Will Suspense be released with 16.7 or will it be in a later release?
Reply Retweet Like
Dan Abramov Oct 29
Replying to @dan_abramov
We needed to get out the proposal early. But you need to be thinking of it in combination with other stuff we’re working on and have shown. It’s all part of the same picture.
Reply Retweet Like
Dan Abramov Oct 29
Replying to @wisecobbler
I think 16.7 is the plan so far
Reply Retweet Like
Alex Galays Oct 29
Replying to @dan_abramov
The basic framework for Suspense is all there and ready though? (throwing a Promise)
Reply Retweet Like
Alec Larson Oct 29
Replying to @dan_abramov
You can use Suspense today, so you can hurry!
Reply Retweet Like
Dan Abramov Oct 29
Replying to @alecdotbiz
Not for data fetching yet. See the talk.
Reply Retweet Like
Dan Abramov Oct 29
Replying to @boubiyeah
Yes. Cache itself is not ready.
Reply Retweet Like
Tyler McGinnis Oct 29
Replying to @dan_abramov
(I may have missed it) Should this be added to the docs somewhere? Right now the only reason given to not refactor is they're a proposal and the API may change. It seems a more important reason is that, as you put it, they're only half the picture?
Reply Retweet Like
Alec Larson Oct 29
Replying to @dan_abramov
I saw the talk, don't remember him saying that. Do you have a timestamp?
Reply Retweet Like
Dan Abramov Oct 29
Replying to @alecdotbiz
Not sure but closer to the end there’s a list of packages, and React Cache is experimental and WIP. That’s the data fetching part.
Reply Retweet Like
Dan Abramov Oct 29
Replying to @tylermcginnis
If you find a good place to put it then sure maybe.
Reply Retweet Like
Alec Larson Oct 29
Replying to @dan_abramov
So you meant to say "wait for React Cache" 😉
Reply Retweet Like
Dan Abramov Oct 29
Replying to @alecdotbiz
In essence, yes.
Reply Retweet Like
nullvoxpopuli Oct 29
Replying to @dan_abramov
it's amazing to me how many people are jumping on this. Like, my first love is , and I know it fairly well, and I have using _all_ the unreleased features... but I wouldn't recommend any of them for people to use in production. :-\
Reply Retweet Like
Dan Abramov Oct 29
Replying to @nullvoxpopuli
Don’t see nothing wrong with experimenting. I’d play with it too.
Reply Retweet Like
Sebastian Markbåge Oct 29
Suspense is out in 16.6. react-cache has its own release schedule so unclear if they’re aligned.
Reply Retweet Like
Dan Abramov Oct 29
I was hoping that we’d at least launch an MVP with 16.7 because this split in what you can or cannot do is confusing
Reply Retweet Like
Sophia Shoemaker 👠 Oct 29
Yeah — what I meant was doing data fetching with Suspense. I started trying to use Suspense over the weekend but realized you can only use it with React.lazy right now right? Any remote data fetching capabilities with react-cache aren’t ready yet?
Reply Retweet Like
Dan Abramov Oct 29
Yeah
Reply Retweet Like