Javascript – User friendly Tech help

How to create Pure Component in React? A functional component that we are modifying as Pure component:- import React from ‘react’; import Tabs from ‘../Tabs’; import ‘./RightPanel.scss’; const RightPanel = () => ( You are on Index.jsx file You are on Panel.jsx file […]

n

What is React Ref? Its another way of communicating with react components apart from “state” and “props” (Ref = creating reference of element). We need it to access the element node, to perform special type of events like “focusing a input element”, text selection. How React Ref works? After React 16.3, it came in the […]

n

The mind, once stretched by a new idea, never regains its original dimensions. Problem:- In Angular cli after executing the command ng lint shows a lot of lint errors based on the configuration `tslint.json`, how to fix lint errors ? Solution:- Run the below command tslint –fix src/**/*.ts -t verbose Note:– It will fix most of the […]

n

How we can remove npm/git tags before publishing:- git tag -d tagName git push origin :refs/tags/tagName Example:- ➜ git:(master) ✗ npm version patch v19.3.2 ➜ git:(master) git tag -d v19.3.2 Deleted tag ‘v19.3.2’ (was 7d16814)

n

Scenario:- Legacy code thrown at you with new UX design, and you cannot touch the original code. So doing latest UI changes is headache. Solution:- Play with the structure of the html and add latest flexbox or grid CSS to make your life hell easier. How i did re-structuring was appending new parent div, which […]

n

Adding test cases to your code always helps in the long run, today we’re going to talk about how to debug test cases. Do something today that your future self will thank you for Using our all-time favorite Console.log it(‘should call touch & asyncValidate methods’, () => { const component = shallow( enter > it will show nvm commands nvm install Node_Version_i_Want $ nvm install 8.9.4 Note:- After installing the latest node incase your build fails […]

n

“Whenever you are confronted with an opponent, conquer them with love.” What is prettier ? In layman terms its an handy tool that will format our code against some set standards, default formatting rules to achieve consistent code style. How to install prettier  in VS Code? Search > Prettier – Code formatter Note:- Incase you have […]

n

I have decided to stick with love. Hate is too great a burden to bear. List all the branches : git branch Pull the recent changes: git pull Create a feature branch : git checkout -b Delete branch local: git branch -d or git branch -D Delete […]

Was this article helpful?
YesNo

Similar Posts