DEV Community

Discussion on: React Hooks for Data Part 1 - Fetching Data

2ezpz2plzme profile image
Steven Liao

Eventually found one good thing about initializing loading state to true. If the component using this custom fetch Hook rendered some other content, it won't flicker. In your case, this shouldn't happen though since BookList isn't rendering anything other than the fetched books.

bdbch profile image
Dominik Biedebach Author

That's true! I'll update the post and add your note to it.