Vue loop binding event listener only binds with the first few elements.

I faced a problem when I had to attach an event listener to many elements rendered through the loop. When rendered, the click event was only attached to the first element and all the other elements didn’t have the listener attached. So, I solved this by passing an additional argument to the listener which was … Read moreVue loop binding event listener only binds with the first few elements.

Categories Vue

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 … Read moreAdd LESS support in Creat-react-app

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 … Read moreReact Hooks Main Points To Note From Documentation