May 06, 2022
Apollo Client Fetch Policy
Last week we looked at Apollo Client and how it could be used to manage queries to GraphQL server. In today’s post, we’ll look at the different fetching policies provided to manage query data and caching.
May 06, 2022
Last week we looked at Apollo Client and how it could be used to manage queries to GraphQL server. In today’s post, we’ll look at the different fetching policies provided to manage query data and caching.
Apr 29, 2022
Apollo client allows us to easily manage our GraphQL queries and data from the clientside. It provides functionalities such as caching, loading state and data propagation to components and most importantly; is compatible with all major UI frameworks. In today’s post, we’ll look at how we can simply hook Apollo client in a React application and use it to query our GraphQL server.
Apr 22, 2022
Common table expression, also called WITH queries, can be used to create auxiliary queries that can be used in larger queries. They can be used to breakdown complex queries into multiple simpler queries which are then used in a primary statement or they can also be used to write recursive queries. In today’s post, we will look at how to define CTE with examples in Postgres.
Apr 15, 2022
useReducer hook in React allows us to manage state in a redux manner. This is useful for handling complex state in a single object, as opposed to useState which is better used with single variable state. With useReducer, we can define a reducer, a set of actions to interact with the state and use a dispatcher to dispatch the actions from our component. In today’s post we will look at how we can use useReducer with example.
Apr 08, 2022
useMemo hook in React can be used to memoize values. Memoization is used as an optimization by caching previous result of computation and directly returning the result when teh same inputs are requested. In today’s post, we’ll look at how we can use useMemo.
Apr 01, 2022
Callback hook in React can be used to memoized a callback function to skip unnecessary rendering. In today’s post we will see why we would useCallback hook.
Mar 25, 2022
Ref hook in React can be used to keep a mutable reference across multiple renders. In today’s post we will see how we can use useRef hook and when they are useful.
Mar 18, 2022
Context hook in React can be used to manage global state. In today’s post we will see how we can use useContext hook and how we can pair it with useState to provide a global state to all children components.
Mar 11, 2022
When using React hooks, we often come across scenarios where we need to perform side effects. For that, a built-in hook is in our disposal; useEffect. In today’s post, we’ll look at how to use useEffect hook and in which context it should be used.
Mar 04, 2022
Few months ago we looked at how we could use web3.py to directly compile Solidity contracts and deploy them on a local ganache-cli blockchain. Although that’s a possible way of deploying smart contracts, it wouldn’t be a recommended way to manage production grade contracts. For that, we would be delegating the steps to a development and testing framework for smart contracts. Such environment provides us an easy way to manage project of smart contracts, manage dependencies, and test our smart contracts. In today’s post, we will look at Brownie, a Python-based development and testing framework for EVM smart contracts
Feb 25, 2022
Ganache is a local blockchain which allows us to develop and test smart contract easily. In today’s post, we will look at how we can start a development Ethereum blockchain in few clicks, and we will look at the feature provided by Ganache.
Feb 18, 2022
When using DBeaver, we can choose betweeen using auto commit or manual commit modes when executing SQL scripts. In today’s post, we will look at how we can switch between the two and how transactions can be managed.
Feb 11, 2022
Last week we talked about type predicate allowing us to narrow down based a variable based on a predicate function. In today’s post, we’ll continue to explore some of the narrowing functionalities of Typescript by looking at discriminated union narrowing and exhaustiveness checking.
Feb 04, 2022
Type predicate in Typescript allows us to narrow down the type of a variable using a predicate. Today we’ll look at how to use type predicates, and show examples where they are useful.
Jan 28, 2022
Following up our previous post on generic types, we created a ServiceResponse<T> type which had a statusCode: string field to differentiate between the responses. In Typescript, a common pattern to differentiate between success and error is to create a union. In today’s post, we will see how we can leverage typegraphql to translate Typescript unions into graphql schema unions.
chrome
cypress
dbeaver
ethereum
figma
flask
git
graphql
jekyll
jenkins
js
maths
metamask
mobx
mysql
oas
postgres
postman
puml
python
solidity
splunk
sqlalchemy
sqlite
typescript
unicode
vscode
zsh