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