Email - harun.bspt2014@gmail.com Phone - +8801717615827
PHP, JS, CSS, Python, and Machine Learning Technology

Refs-and- key- in-React

Refs-and- key- in-React

First off, let me express that this is generally not the way to go about things in React land. Usually what you want to do is pass down functionality to children in props, and pass up notifications ...

Redux Source Code

Redux Source Code

Lets look at the Redux Source Code https://github.com/reduxjs/redux/blob/9d3273846aa8906d38890c410b62fb09a4992018/src/combineReducers.ts#L197 let hasChanged = false const nextState: ...

What is Snapshot testing

What is Snapshot testing

A cool feature that Jest has is snapshots. This takes a snapshot of your component and how it renders and then will compare that whenever doing other tests to let you know if something unexpected is ...

Shallow Renderer

Shallow Renderer

When writing unit tests for React, shallow rendering can be helpful. Shallow rendering lets you render a component “one level deep” and assert facts about what its render method returns, without ...

Styled-component

Styled-component

The main thing you need to understand about Styled Components is that its name should be taken quite literally. You are no longer styling HTML elements or components based on their class or HTML ...

UseReducer Hook

UseReducer Hook

useReducer hook accepts two arguments first argument is reducer function and second argument is initial app state then it return array with two elements - state and a dispatch function. A Reducer ...

Replacing componentWillUnmount with useEffect()

Replacing componentWillUnmount with useEffect()

Replacing componentWillUnmount with useEffect() componentWillUnmount() { console.log('will unmount'); } // Now to replicate the above, just return a function inside useEffect() which will ...

useEffect-compare-array-in-second-argument-shallow

useEffect-compare-array-in-second-argument-shallow

 Problem - Effect re-run endlessly when using an array as a second argument for useEffect which is not the case when I use the array.length instead CodeSandbox : codesandbox.io/s/nrwq08p9zj (you can ...

The problem around dependency array

The problem around dependency array

The problem around dependency array I trying to wrap my head around the new hooks api of react. Specifically, I'm trying to construct the classic use case that once was the following: ...

Translate »
Register New Account