12 useful JavaScript array techniques

Array is one of the most common concepts in Javascript. It provides us with many possibilities to process data. It is necessary to be familiar with some common operations of array.1. Array de duplication1. from() superimposes the new Set() methodThe from method can be directly used for the de duplication of string or numeric array.var plants = ...

Posted by amir1985 on Mon, 14 Feb 2022 05:43:14 +0100

Use RxJs to implement an Angular Component that supports infinite scroll

First, let's take a look at the runtime effect of my Angular application that supports infinite scroll:https://jerry-infinite-scroll...Scroll the middle mouse button and scroll down to trigger the list to continuously send requests to the background to load new data:The following are the specific development steps.(1) app.component.html source ...

Posted by dcole on Mon, 14 Feb 2022 05:27:32 +0100

async/await you can use it, but do you know how to deal with errors?

prefaceHello, I'm Lin Sanxin. The most difficult knowledge point in the most easy to understand words is my motto. The foundation is advanced, and the premise is my original intentionPromise encapsulation requestIf you usually use Promise to encapsulate the request, when you use this request function:// Encapsulation request function const requ ...

Posted by nileshn on Mon, 14 Feb 2022 03:44:44 +0100

Explore React synthetic events

Explore React synthetic events 1, What is a composite event React synthetic event is an event object that can simulate all the capabilities of native DOM events, that is, the cross browser wrapper of browser native events. It defines synthetic events according to W3C specification, is compatible with all browsers, and has the same interface as ...

Posted by Lashiec on Mon, 14 Feb 2022 02:34:56 +0100

vue custom instruction usage

preface 1, Vue's custom instructions are divided into? In addition to the built-in instructions of core functions, vue also allows the registration of user-defined instructions. In some cases, user-defined instructions will be used for the underlying operation of ordinary DOM elements. User defined instructions are divided into global u ...

Posted by nicky77uk1 on Mon, 14 Feb 2022 00:46:34 +0100

[VUE] traversal list

conditional rendering v-if Writing method: v-if = "expression"v-else-if = "expression"v-else = "expression"Applicable to: scenes with low switching frequencyFeatures: DOM elements that are not displayed are removed directlyNote: v-if can be used together with: v-else-if and v-else, but the structure must ...

Posted by metomeya on Sun, 13 Feb 2022 17:14:35 +0100

Wechat applet - Custom Component

         Custom components   developers can abstract the functional modules in the page into custom components for reuse in different pages; Complex pages can also be divided into multiple low coupling modules, which is helpful for code maintenance. Custom components are very similar to basic components when used.     Create custo ...

Posted by kat_jumper_33 on Sun, 13 Feb 2022 16:52:25 +0100

Building a common Vue component library using Vue Demi

In this article, we learn about Vue Demi by considering its function, how it works, and how to start using it.Vue Demi is a great package with a lot of potential and practicality. I strongly recommend using it when creating the next Vue library.According to the founder Anthony Fu, Vue Demi Is a development utility that allows users to write com ...

Posted by rgpayne on Sun, 13 Feb 2022 14:44:07 +0100

webpack system learning Tree Shaking concept explanation

When the project reaches a certain volume, dividing the code into modules can be easier for us to manage. However, when doing so, we may introduce unnecessary code, and Tree Shaking is a method to optimize the volume by eliminating the code used in the file. Note: Tree Shaking only supports volume optimization for statically introduced modules. ...

Posted by seularts on Sun, 13 Feb 2022 13:23:49 +0100

Basic usage of Ant Design Vue: importing components and customizing themes on demand

introductionAs a latecomer, ant design vue is not as famous as element, the pioneer of vue component library. However, with more elements, I still see it in front of me when I start to use antv. Antv is really very different from element in interaction design and api design. I think this difference is better than element.This note is based on v ...

Posted by dbradbury on Sun, 13 Feb 2022 12:44:43 +0100