TypeScipt / Javascript

How to show reference count in Visual Studio Code

CodeLens in VS code

While the developing, especially while the code cleaning, you often want to know if your method is used or not. It’s usually when you make some temporary methods to determine the optimal one. Visual Studio shows the reference count by default, but Visual Studio Code doesn’t do that. But it’s very useful. Here is how […] Read more»

TypeScipt / Javascript

Get the host of the URL with JavaScript or TypeScript

Javascript logo

We have a string with an URL. And we want to get the host URL. I don’t know about the built-in functions for this and I don’t think that you should find external libraries for this. Although, it’s a good idea to create your own personal class. Read more»

TypeScipt / Javascript

A JS/TS useful snippet to return top N records ordered by time

Javascript logo

A JS/TS useful snippet to return only several last records with sorting by time. The data is stored in localStorage. I can’t modify the types for external component, so that’s why all the data has string types. and I use ‘moment’ to convert the strings to the date format. Read more»

TypeScipt / Javascript

useEffect and load async data in React

I spent a lot of time to understand how to get async data from web-services and to set it to vars in React I need to try to change ‘fetch’ to ‘axios’ Read more»

TypeScipt / Javascript

NodeJS. Fix error “create react app npm ERR! Maximum call stack size exceeded”

NodeJS

Recently I started to learn ReactJS. I could manually install the environment in NodeJS for ReactJS – WebPack, ReactJS, Babel and others. But to make solutions easier, I decided to use Create-react-app. Unfortunately, I got the error “create react app npm ERR! Maximum call stack size exceeded”. Read more»

TypeScipt / Javascript

Using multiline string variables in JavaScript

Javascript logo

Javascript never had good ways to use multiline strings before ES6 had appeared. In ES6 you can use template literals – strings delimited by backticks instead of quotes, single or double. But what to do if you can not use ES6 possibilities? Read more»

TypeScipt / Javascript

Popular Posts