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.

How 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 […]

How to fix BrowserRouter for React Apps on Apache

While learning React, most people develop and test their apps locally. I mean … they’re just demo apps for learning purposes right? Nobody wants to see stuff like that, so why even think of deploying the apps somewhere? But then comes the day where you try to deploy a React App to a web server, […]

Is there a way to host a React app without a NodeJS Server?

So you built your first React app and now it’s time to get it out in the world. But where do you host a React app? Until now, you probably ran your app with npm start which spins up a development server for you to debug and test your app. But that won’t work in […]

3 Quick Wins to Test Your Presentational React Components with Jest

Testing tubes in a Lab depicting a test environment like for Jest tests :)

Did you ever ask yourself, if it makes sense to test presentational components, or if it’s just too time consuming? Good news, you’re not alone! That’s why I put together three ways to create useful Jest tests for your presentational components without spending too much time.

How and Why to Bind a Callback Function in React Components

javascript-this-code

This might sound familiar to you: You run your React app after you made some changes to test your new functionality and get an error message like this: “this.setState’ is not a function“. It’s probably because you forgot to bind a callback function before passing it down a prop. Today you’ll learn why you need […]

5 UI Libraries to Use With React

UI Libraries for React - Cover Picture

If you’re a developer who – like me – is not a good designer or a CSS pro, you might know how troublesome it can be to put together the design for your React app. You spend a lot of time tinkering with the styles, but in the end, it just doesn’t look quite nice.