Summary
The section on the useEffect page about good alternative to fetching data is a great resource, but does not mention the use API at all. I recommend adding some text to clarify the existence of this option and any pros/cons.
Page
https://react.dev/reference/react/useEffect#what-are-good-alternatives-to-data-fetching-in-effects
Details
It is unclear from the documentation what the relationship between useEffect and use is. The useEffect page does not mention the use API at all, and neither does the use page. The useEffect page contains a section called “Fetching data with Effects”, and the use page contains a section called Streaming data from the server to the client. So, it sounds like both can be used for fetching data, but there is no acknowledgement of this or relevant guidance.
Summary
The section on the
useEffectpage about good alternative to fetching data is a great resource, but does not mention theuseAPI at all. I recommend adding some text to clarify the existence of this option and any pros/cons.Page
https://react.dev/reference/react/useEffect#what-are-good-alternatives-to-data-fetching-in-effects
Details
It is unclear from the documentation what the relationship between
useEffectanduseis. TheuseEffectpage does not mention theuseAPI at all, and neither does theusepage. TheuseEffectpage contains a section called “Fetching data with Effects”, and theusepage contains a section called Streaming data from the server to the client. So, it sounds like both can be used for fetching data, but there is no acknowledgement of this or relevant guidance.