React Query: It’s Time to Break up with your "Global State”! -Tanner Linsley

  Рет қаралды 142,155

React Conferences by GitNation

React Conferences by GitNation

Күн бұрын

Пікірлер: 127
@makertolentino
@makertolentino 4 жыл бұрын
This dude is a rockstar
@fostertheweb
@fostertheweb 4 жыл бұрын
react-query examples start at 16:08 for anyone coming back for reference
@EdwinManual
@EdwinManual 3 жыл бұрын
This is the library we need. But not the one we deserve. He is a true hero ❤️
@tshddx
@tshddx 4 жыл бұрын
I’ve checked out React-query before, but this video really sold me on the concept! I’m going to try it out on a new internal tool at work. I would love to see more screencasts covering some of the more advanced features like pagination.
@traviswatson6527
@traviswatson6527 3 жыл бұрын
21:20 I hope I am missing something on this mock server failure, it looks like it corrupted the list (removed Tanner even though Tanner 2 was the one that failed) and lost the user’s changes. Pessimistic me is not impressed with this optimistic mutation.
@qorzzz9252
@qorzzz9252 Жыл бұрын
I also noticed this, seems like rollback not working properly.
@ВикторСтефанов-ш5р
@ВикторСтефанов-ш5р 6 ай бұрын
Or maybe to delete Tanner and get the response back Tanner 2 was already inserted and the initial value deleted?
@aeronwolfe7072
@aeronwolfe7072 Жыл бұрын
it took me a while to get used to the way it works, and how to sperate out my api's from my components, but at this point, i would never go back. i absolutely LOVE react-query (tannstack query). it makes it SO easy... and the fact that it's smart about caching, even when I AM NOT, is amazing!!!!!! Thank you Tanner Linsley!!! still using your library!!!
@patrickkaipainen3301
@patrickkaipainen3301 2 жыл бұрын
The overview of different 'naive' strategies for dealing with async data is actually really great. Going from simple useState/useEffect combo in a component, to a decoupled context module that can handle de-duping
@sylviaadamski8191
@sylviaadamski8191 2 жыл бұрын
Massive thx for React Query :) Been using it for a few weeks now and it is a breeze! React Query is especially useful for devs who focus on the frontend and usability side of things rather than having to deal with complicated React state managers.
@amnonsadeh8047
@amnonsadeh8047 2 жыл бұрын
Bug at 21:20 ? He demonstrates optimistic UI by creating two posts. The second post fails, but when the UI updates to reflect that, it's the first which disappears...
@NITINKUMARNagamala
@NITINKUMARNagamala Ай бұрын
May be the rollback got updated to the latest.
@TodorPavlov
@TodorPavlov Жыл бұрын
The topic is interesting but the code is not readable at all - please in the feature when you make videos put the code on full screen and yourself in the lower right part of the screen (by the way I use 56 inch monitor so the problem is not in the monitor size).
@ahmedsafwat3488
@ahmedsafwat3488 8 ай бұрын
also the ads in the bottom is so annoying but great content
@moutonguerrier
@moutonguerrier 2 жыл бұрын
12:00 how to de-dupe requests by using a react ref on the Promise 17:00 react-query in the blog app starts here
@PankajKumar-mv8pd
@PankajKumar-mv8pd 4 жыл бұрын
Hi Tanner, React query looks very good. Thanks for making this. I have one question related to the normalizing state, suppose I have to add comment section in each post. Earlier we used normalizer for this. How normalizer will fit in React Query state? Do you have any example of that?
@piby1802
@piby1802 4 жыл бұрын
I was just struggling to organize my state in my react native app. Just found your video and the library. May thanks, sir! Could you share link to the code so that we can play with it?
@mKumaranVeera
@mKumaranVeera 4 жыл бұрын
Sorry, I couldn't continue the video, I can't see the code editor 🧐
@jimshtepa5423
@jimshtepa5423 2 жыл бұрын
Thank you for this informative talk and great presentation. I was wondering if the codebase that Tan is using available publicly?
@ChrisDieringer
@ChrisDieringer 4 жыл бұрын
the slide-show? is quite nice. anyone know what toolkit was used to _build_ this presentation?
@tannerlinsley
@tannerlinsley 4 жыл бұрын
Keynote from Apple
@rubencalzacorta879
@rubencalzacorta879 4 жыл бұрын
its called Powerpoint
@tannerlinsley
@tannerlinsley 4 жыл бұрын
Ruben Calzacorta nope. Keynote
@mustaflex
@mustaflex 4 жыл бұрын
"Prop Drilling" such a good way to share the pain of passing down the props to children.
@ГерриПитт
@ГерриПитт 3 жыл бұрын
Nice talk, man! It would have been great if you had shared a link to the code.
@8497715
@8497715 2 жыл бұрын
What presentation engine do you use? It is visually awesome!
@chauvoluuhuong7485
@chauvoluuhuong7485 2 жыл бұрын
For deduping requests why don't you just add to the PostCount component a prop as a number of posts. btw, your presentation about benefit of using react-query is very good
@Victor-zg8kq
@Victor-zg8kq 2 жыл бұрын
For future vids, please show the code full screen and shrink the speaker into one of the corners.
@Atif1702
@Atif1702 3 жыл бұрын
Unable to see the code at all. 20% of the screen is code editor whereas it should have been on at least 50%.
@jimshtepa5423
@jimshtepa5423 2 жыл бұрын
at 11:20 Tanner confirms that implementing a global state and attempting to pass it down the component tree doesn't work. However I didn't full understand the explanation. Can someone please explain why global state didn't resolve the issue related to multiple invokiation of the fetch function?
@chetan9533
@chetan9533 2 жыл бұрын
Because the global state is just a state variable accessible to all components. But where is the logic that actually fires a network request? It's inside a useEffect within our custom hook(usePosts), right? Now the custom hook is supposed to be used at multiple places within our app. And the code within custom hook(which includes invoking fetch function) runs as many times as we reuse the custom hook (similar to why code inside a normal function runs as many times as you invoke/call that normal function). So code within custom hook running multiple times -> multiple network requests
@KomarovPavel-if8ud
@KomarovPavel-if8ud 2 жыл бұрын
I think what's missing in this talk is REST. The introduced concept of "server state" was used in two ways: to point out to data persisted beyond client and to point out to a part of "global state". It's an awkward abstraction. I think it's better to use REST language and talk about resources and representations of their state. React-query extends http/rest abstractions into the client app, but most of it already exists! The web is layered by design and same thing that react-query does on client can be done on any layer between a client and a server. In fact there might not even be "the server" you are talking to. With clouds you might deal with clusters and many layers of caching and god only knows where your response comes from. Browser also does caching. So it's more appropriate to talk about resources and representations of their state, it's better to have one language for the whole web layer than to separate frontend and create separate abstractions, it's better to solve problems with the whole stack of web technologies than to think inside frontend JavaScript box. It might be that later on part of the solution would be on the backend and it would push updates to the client instead of client refetching it, or it might be that browsers will build something on top of fetch with similar capabilities to what react-query provides - who knows! And ofc if you use REST language it becomes obvious that all of this relates to a particular way of network communication and that there're other ways like streams, where there're different problems and different solutions. Great presentation though and great technology! I'm two years late with my project plagued by legacy, but I'm glad that I'm catching on)))
@mohamedfouedslama3412
@mohamedfouedslama3412 3 жыл бұрын
just awesome man. used react query as an experiment and it is just super convinient and easy to work with. i am used to use redux at work but now i'm gonna reconsider this decision. keep up the hard work and thanks for this awesome tool.
@niallryan209
@niallryan209 4 жыл бұрын
Great video. Definitely going to start using react query.
@tannerlinsley
@tannerlinsley 4 жыл бұрын
Nice!
@RakeshKumarBN
@RakeshKumarBN 4 жыл бұрын
wow!! looks like react-query is going replace redux as server state management tool in the future but as now they can live side by side together
@MrChrisk8er
@MrChrisk8er 3 жыл бұрын
Hi, can you please share the code? I need to learn it. Thanks
@KunalKamble
@KunalKamble 4 жыл бұрын
It’s really hard to see your code, you should have made code full screen or increase font size.
@ljuglampa
@ljuglampa 4 жыл бұрын
This library will (have?) blow tf up. Love it.
@squashtomato
@squashtomato 3 жыл бұрын
get this man a glass of water, he needs and deserves it. He is doing God's work
@adepressedman7156
@adepressedman7156 3 жыл бұрын
LOL
@mitsukiorichimaru4511
@mitsukiorichimaru4511 4 жыл бұрын
haha at 18:25 you renamed another post to "tanner" which makes the searched dead post in side bar come to life
@richardhulse9328
@richardhulse9328 4 жыл бұрын
Really, really great video. Please: more editor on screen, and less audio compression on the mic as it makes you sound asthmatic!
@toneyf
@toneyf 4 жыл бұрын
will it work with websockets data?
@braveman4665
@braveman4665 2 жыл бұрын
anyone got link for the source?
@zakidev
@zakidev Жыл бұрын
Tanner is life saver
@az1nn
@az1nn 2 жыл бұрын
very good! nice explanation about the motivation of creating react query!
@ZeeshanAhmad-lq5nc
@ZeeshanAhmad-lq5nc 3 жыл бұрын
where i can find this repo?
@akshayagrawal8130
@akshayagrawal8130 3 жыл бұрын
Absolutely amazing..I never knew I needed this. Impressive presentation
@javascriptduniya1201
@javascriptduniya1201 2 жыл бұрын
font size is to small. I closed video after trying hard for few minutes
@akeinchina
@akeinchina 2 жыл бұрын
Amazing content! Thank you Tanner!
@zzy8811
@zzy8811 2 жыл бұрын
Thank you, a useful intro!
@lg2389
@lg2389 4 жыл бұрын
Great talk man! I will look more into react-query and try it out! Def somethings to improve on your talks. Breathing and if you show code, please make your font size higher, but aside from that, the example and how you laid out the talk was great (:
@jahadempire7934
@jahadempire7934 4 жыл бұрын
Newbs here, if I have a client state, then what state manager I will use?
@jahadempire7934
@jahadempire7934 4 жыл бұрын
oh, he said @26:00 he used context and useReducer..
@magnusmarkling
@magnusmarkling 3 жыл бұрын
Fantastic presentation!
@thedeveloper4207
@thedeveloper4207 4 жыл бұрын
CAN'T SEE THE CODE
@sergeykahnwald6640
@sergeykahnwald6640 2 жыл бұрын
Great job man!
@heesoolee72
@heesoolee72 Жыл бұрын
This video is amazing. Btw his keynote skill is amazing too.
@jbradshaw7
@jbradshaw7 4 жыл бұрын
I didn't realise I needed this until I watched - thanks.
@chriszhang3629
@chriszhang3629 4 жыл бұрын
This is amazing!
@tannerlinsley
@tannerlinsley 4 жыл бұрын
Thanks!!
@shoaibbhimani7831
@shoaibbhimani7831 4 жыл бұрын
Thanks Tanner Nicely Explained
@mivchal333
@mivchal333 2 жыл бұрын
You are React Rockstar!
@jrandiny3
@jrandiny3 4 жыл бұрын
Wow, I have been searching this for a long time. Long story short, my searching skill let me down. Well it's better late than never
@ralexand56
@ralexand56 4 жыл бұрын
This is freaking amazing!
@hitchlander3800
@hitchlander3800 3 жыл бұрын
Thank you Tanner . Makes a lot of sense.
@galbatorixtheking9779
@galbatorixtheking9779 4 жыл бұрын
is this code on github? can someone please share the link for it?
@OmkarRajam
@OmkarRajam 4 жыл бұрын
Code in vid is here: github.com/tannerlinsley/react-query-blog-refactor-example/commits/master Each commit is a stage like in the video. If you're using VScode with Gitlens, it's easy to check out the version of the code at that commit like Tanner does in the video
@blank001
@blank001 3 жыл бұрын
To me this guy is a Rock star in Tech world.
@tsooooooo
@tsooooooo 3 жыл бұрын
Very cool work
@glendonphilippbaculio1811
@glendonphilippbaculio1811 4 жыл бұрын
good for backend operations but i just personally prefer redux for local state management specially with react native, you use react navigation, you know why it's useful there
@user-hu1jr6fb9k
@user-hu1jr6fb9k 3 жыл бұрын
that's exactly what he's suggesting
@ricardoespinoza5821
@ricardoespinoza5821 3 жыл бұрын
awesome things from tanner as always
@meandillar69
@meandillar69 4 жыл бұрын
Thanks for the great video!
@pooryaj2092
@pooryaj2092 4 жыл бұрын
What is this cam-girl size camera, show the code man
3 жыл бұрын
This is briliant
@mitsukiorichimaru4511
@mitsukiorichimaru4511 4 жыл бұрын
kzbin.info/www/bejne/qZa4ZWmZa6-tbac at 18:13 you have deleted a updated post but you can still see posts title "tanner" found in the sidebar
@asyncasync
@asyncasync 4 жыл бұрын
People keep mentioning how this is going to replace redux, but for me one of the selling points for redux is the ability to easily keep track of state while debugging using redux devtools. How do I debug this?
@babri1402
@babri1402 4 жыл бұрын
github.com/tannerlinsley/react-query-devtools By using this perhaps?
@asyncasync
@asyncasync 4 жыл бұрын
@@babri1402 it does not seem to support time travel though and the maintainer closed an issue about it saying he is not planning on implementing this any time soon.
@AdrianGonzalezBlogs
@AdrianGonzalezBlogs 4 жыл бұрын
This is great!
@rjmunt
@rjmunt 4 жыл бұрын
Thanks a lot sir!
@tannerlinsley
@tannerlinsley 4 жыл бұрын
My pleasure!
@pannihto7588
@pannihto7588 4 жыл бұрын
So basically, this is Apollo Client for REST API
@AW-zk4nf
@AW-zk4nf 4 жыл бұрын
seems like mind blowing to who haven't use react apollo hooks before...
@avi7278
@avi7278 4 жыл бұрын
I can't see the difference between this and Apollo Client for React. Unless you were referring to AC as overpowered, because it provides all this functionality and more, like being able to run graph queries on your cache, and observable queries with subscriptions. ReactQuery looks like a pared-down version of Apollo Client.
@RomeoMihalcea
@RomeoMihalcea 2 жыл бұрын
neat stuff - by the time people learn this thing it will already be obsolete.
@mrwho2513
@mrwho2513 4 жыл бұрын
12:54 - farting time
@CathalMacDonnacha
@CathalMacDonnacha 4 жыл бұрын
😂
@codefinity
@codefinity 3 жыл бұрын
🤣 I never would have thought 💭 that!
@heesoolee72
@heesoolee72 Жыл бұрын
dude lol
@ПашаБелугин
@ПашаБелугин 4 жыл бұрын
Stop stop stop! Do you wanna say that Dan Abramov was wrong? This cannot be! That way the industry will soon discover some advanced features like OOP and maybe even MVC!
@tannerlinsley
@tannerlinsley 4 жыл бұрын
Not sure what this has to do with the content. 🤷‍♂️
@anoopvasudevan
@anoopvasudevan 3 жыл бұрын
man this is awesome! would like to know what's happening under the hood
@i-am-the-slime
@i-am-the-slime 2 жыл бұрын
How do you look younger than a photo of yourself?
@i-am-the-slime
@i-am-the-slime 2 жыл бұрын
Ben Jsman Button!
@jimbo4728
@jimbo4728 4 жыл бұрын
this video is unwatchable. I really wanted to watch it but that microphone is way to sensitive, hearing all the breathing and swallowing drives some people insane. less sensitive microphone would be good
@tomasmedina
@tomasmedina 3 жыл бұрын
this is exactly what i was looking for to handle my server state!
@mosespeter9711
@mosespeter9711 4 жыл бұрын
We really don't need to see your face throughout the video... the code is so tiny and almost invisible because of the screen split between it and your face. Great Concept though
@haroldpepete
@haroldpepete 2 жыл бұрын
i need a new eyes after watching this video
@wkencel
@wkencel 3 жыл бұрын
Young Jonah Hill makes a badass developer
@Arzen84
@Arzen84 3 жыл бұрын
I wish I'd be just half as smart as Tanner :sweaty-smile;
@Peter-ur8nv
@Peter-ur8nv 4 жыл бұрын
Sadly there is no option to hit like button more than once...
@hansheng654
@hansheng654 4 жыл бұрын
Coming from backend dev and functional programming world, when I first learnt react and concept of redux.. I knew that the frontend dev world is fked..... Global state can be bad, singleton should be avoided... Pure functions only... Those are common ideas among functional programming yet very different in the react world.
@omicronx94
@omicronx94 4 жыл бұрын
Lol you have no idea what you're talking about. React is in fact centered around pure functions and not using singletons. Why do you think it's called "React" ?
@hansheng654
@hansheng654 4 жыл бұрын
@@omicronx94 then you have redux ,context API
@yashmalik3037
@yashmalik3037 4 жыл бұрын
You have such clear mic that your breathing is irritating. I can't focus on what you are saying, I can't go through this. Please drink some water and work on your breathing while recording. I almost threw my laptop after bearing 8 minutes 28 seconds of this video.
@LouaiAmrouche-iu9bc
@LouaiAmrouche-iu9bc Жыл бұрын
bro fix your docs, they're the worst i've ever seen
@daniilkonoplev5499
@daniilkonoplev5499 4 жыл бұрын
"I absolutely love React... and Javascript". Liar. Nobody loves JS :D
@scotttang6229
@scotttang6229 4 жыл бұрын
I love JS...
@MunyaradziRangaIncrease
@MunyaradziRangaIncrease 3 жыл бұрын
Math.abs(genius = 1)
@parrot785
@parrot785 3 жыл бұрын
Awesome presentation!
번쩍번쩍 거리는 입
0:32
승비니 Seungbini
Рет қаралды 182 МЛН
Вопрос Ребром - Джиган
43:52
Gazgolder
Рет қаралды 3,8 МЛН
I think about this article a lot...
8:18
Theo - t3․gg
Рет қаралды 83 М.
React Query tips from the maintainer @tkDodo
16:19
Andrew Burgess
Рет қаралды 27 М.
Why Everyone Loves Zustand
29:27
Theo - t3․gg
Рет қаралды 118 М.
React Query Is (Still) Essential - My Favorite React Library
11:04
Theo - t3․gg
Рет қаралды 160 М.
Goodbye, useEffect - David Khourshid
29:59
BeJS
Рет қаралды 505 М.
State Managers Are Making Your Code Worse In React
13:33
Web Dev Simplified
Рет қаралды 214 М.
Redux Toolkit Query vs React Query
22:12
Jack Herrington
Рет қаралды 110 М.
OAuth 2.0 and OpenID Connect (in plain English)
1:02:17
OktaDev
Рет қаралды 1,8 МЛН