Development

Use redux-like middleware for useReducer in React

Use redux-like middleware for useReducer in React

  • January 14, 2021

If you have used Redux before, you would be aware of the concept of middlewares. Now that useReducer has become a commonly used react hook, we might want to replicate the idea of middleware for the useReducer hook as well. If you do not know about middlewares, middlewares are functions...

How to write your own custom React hooks

How to write your own custom React hooks

  • January 12, 2021

If you have been using react for a while, chances are you have come across the need to extract some logic into a reusable function. And with React hooks coming into the picture, doing this has become a walk in the park. We can write our own custom react hooks...

Open-Source AI Tools

Open-Source AI Tools

  • December 22, 2020

In this article, we will go through some of the most commonly used open-source AI tools available in the market. This is not an exhaustive list. But it serves as a good starting point for anyone trying to venture into machine learning or artificial intelligence. Since these are open-source AI...

Provide callback to useState hook like setState

Provide callback to useState hook like setState

  • December 15, 2020

If you have been writing class components for a while, you might be familiar with the callback functionality that the setState function provides. setState allows a second parameter to be passed to it as a callback. The callback function is invoked whenever the state of the function gets updated. But,...

Resolving nested queries in GraphQL

Resolving nested queries in GraphQL

  • December 8, 2020

When creating a GraphQL server with relational data, we want to return the data in a hierarchical format with those relationships in a single query. After all, that is where GraphQL comes in handy, right? Let us look into how we can do this using nested queries in GraphQL. This...

Creating a GraphQL API with Apollo Server

Creating a GraphQL API with Apollo Server

  • December 2, 2020

One of the many complaints about the GraphQL ecosystem is that there is a lot of indirection around what packages to use to create a GraphQL application. Even after selecting one, there is a lot of boilerplate code that one must create to make a GraphQL server work. While that...