Did you already try the `useEffect` hook, maybe to fetch data on the first mount of your component? How did it work out for you?
Continue reading Why is my useEffect Hook executed in an endless loop?Month: February 2019
How to Load Data from a REST API with React Hooks
With this week’s release of React 16.8, Hooks were finally released into the wild. They allow us doing a lot of stuff that wasn’t possible until now. For example, loading data into the state of a functional component. But let’s have a closer look.
Continue reading How to Load Data from a REST API with React HooksHow to Call a REST API from a React Component
At some point in your journey of learning React, you’ll get to the point where you want a component to consume an API. Or maybe you want to connect your app to a REST backend, you name it. After all, you want that flippin’ data from that server in your app.
But how do you get the data from an API or your backend into your component?
Continue reading How to Call a REST API from a React Component