Explicit Data Fetching with React

Learn to change implementation details from implicit to explicit data (re-)fetching.

We'll cover the following

Re-fetching all data each time someone types in the input field isn’t optimal. Since we’re using a third-party API to fetch the data, its internals are out of our reach. Eventually, we will incur rate limiting, which returns an error instead of data.

To solve this problem, change the implementation details from implicit to explicit data (re-)fetching. In other words, the application will refetch data only if someone clicks a confirmation button. First, add a button element for the confirmation to the JSX:

Get hands-on with 1200+ tech skills courses.