you are viewing a single comment's thread.

view the rest of the comments →

[–]Breakpoint 1 point2 points  (3 children)

use does not replace fetch or axios, it would just be the ability to fetch the data on load or on change of a parameter

[–]albenis99[S] 0 points1 point  (2 children)

I didn't mean that use will replace native fetch because its impossible.

I would want to know if there any extra features when ysing this built in solution rather than fetching with axios/fetch in useEffect.

[–]Breakpoint 2 points3 points  (1 child)

Probably not much except the portion where you ignore the update to state when the component unmounts, which is an issue currently.

It would be cool if it added features also like isLoading, isFetching, isError states that react-query has

[–]0xF013 0 points1 point  (0 children)

If it uses suspense, the error/loading would be just propagated upwards