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 production. Continue reading Is there a way to host a React app without a NodeJS Server?

Sync up multiple Promises to a single result set with Promise.all

Did you ever try to use data from multiple Promises but could not figure out how to sync up the requests to return a single result or Promise?

For example: A http request (e.g. using fetch) returns a single Promise that is executed asynchronously. If you would just execute a bunch of requests, there is no chance to get all responses into one array just by calling them after each other. Continue reading Sync up multiple Promises to a single result set with Promise.all

How to dynamically add CSS Classes to React Elements using State

If you’re just starting out with React, you might soon get to the point where you want to dynamically change the styling of some React Elements – e.g. at the click of a button. In this post we have a closer look at this concept.  Continue reading How to dynamically add CSS Classes to React Elements using State

3 Quick Wins to Test Your Presentational React Components with Jest

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.

Continue reading 3 Quick Wins to Test Your Presentational React Components with Jest

How and Why to Bind a Callback Function in React Components

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 to bind, and how to bind a callback function in React.

Continue reading How and Why to Bind a Callback Function in React Components

5 UI Libraries to Use With React

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.

Continue reading 5 UI Libraries to Use With React

How to Create a React App with create-react-app

Setting up a React app can be confusing, since you have to take care of a lot of stuff that you don’t want to think about—at least at the beginning of your React journey. Fortunately there is a tool called create-react-app that is a neat shortcut. It allows you to start developing right away without having to worry about stuff like webpack and/or babel.

Continue reading How to Create a React App with create-react-app

A React Beginners Roadmap through the React Ecosystem

React beginners often have a hard time learning React, since the React ecosystem seems huge. You will inevitably stumble upon stuff like Redux, Webpack or Babel very early. At this point I was so overwhelmed because I had no clue where to start first.

It was even more confusing that I didn’t even know the problems that those tools tried to solve. Today I know better and I’m going to tell you that there is no need for any of these – at least not yet.

Continue reading A React Beginners Roadmap through the React Ecosystem