React redux and saga pattern.

This is a simple pattern that will provide react hook and react higher component to get the state from redux and register the actions. First create a ts file with an initial state, reducers, and saga effects: In the above code, the namespace must be the first part of the type in effects and reducers and second should be the […]

Add LESS support in Creat-react-app

Right now creat-react-app supports SASS by default. So to add less support we need to eject first and then edit “webpack.config.js” file. To eject configuration run following command: And install less loader and less Now search following: And replace with Now we need to replace SASS loader with less loader. Find the following lines: in the above lines replace text […]

React Hooks Main Points To Note From Documentation

useState() : Takes One argument – the initial value of variable Uses Array destructuring feature. e.g. := const [variableName, functionName] = useState(value) Where : variableName : that will be stored in state functionName: The that will be used to set the value of variableName value : the initial value of variable variableName useEffect() : The Effect Hook, useEffect, adds the […]