正在加载视频...

视频加载失败

❌ Don't pass props to multiple nested components in React. ✅ Instead use libraries like react-query to better handle server state.

137,429 次观看 • 2 年前 •via X (Twitter)

10 条评论

George Moller 的头像
George Moller2 年前

I've been working professionally with React for more than 8 years and I compiled all my knowledge into 100+ infographics and video animations just like this one. Check them out ↓

George Moller 的头像
George Moller2 年前

I've been working professionally with React for more than 8 years and I compiled all my knowledge into 100+ infographics and video animations just like this one. Check them out ↓

Dominik 🔮 的头像
Dominik 🔮2 年前

It would be cool if you could recommend importing from '@tanstack/react-query' instead of just 'react-query'. We've moved to the TanStack umbrella over a year ago.

George Moller 的头像
George Moller2 年前

Will do Dominik!

Akhil 17 的头像
Akhil 172 年前

But using the same query inside dashboard will trigger another api call right?

George Moller 的头像
George Moller2 年前

Nope, it only triggers another api call if the data is not already in the cache.

Pavel Romanov 的头像
Pavel Romanov2 年前

Love this concept and react-query in general! First time I saw it was in this great article:

MUIZ 的头像
MUIZ2 年前

I use Redux for state management. React query look simpler and reduces redux broiler plate. Does react query works with React Native? Any cons I should be aware of?

Oury Tenguella 的头像
Oury Tenguella2 年前

State colocation, right ?

Nikki Siapno 的头像
Nikki Siapno2 年前

Agree, important tip George!

相关视频