I made an online whiteboard!!!

I believe that friends who write articles must have the need to draw pictures at ordinary times. The author usually uses an online hand-painted style whiteboard-- excalidraw There's nothing to say about the use experience, but there's a problem. It can't be saved in the cloud, but the good news is that it's open source, so I'm thinking about wh ...

Posted by CallItKarma on Wed, 27 Apr 2022 17:17:20 +0300

vue2. In object. X version Defineproperty object property listening and Association

prefaceIn vue2 In the official document of version x Deep response principle https://cn.vuejs.org/v2/guide/reactivity.html In the explanation of the article, object Defineproperty transforms the state of declarative and responsive property data into getter s and setter s.Object. Basic usage and concept of definepropertyThe concept of official ...

Posted by bumbar on Wed, 27 Apr 2022 05:44:41 +0300

JavaScript switch statement, break, shared case

switch Statements Switch statement is another conditional branch statement of JavaScript. Compared with if, in some cases, switch statement is more concise and readable. grammar switch( exp ){ case 'val1': ...//Code block 1 break; case 'val2': ...//Code block 2 break; ... default: } The switch statement consists of a con ...

Posted by brandtj on Tue, 26 Apr 2022 02:19:16 +0300

Interpretation of all APIs of "React advanced"

Question: 1. What are the APIs exposed by react and how to use them? 2 what means does react provide for self-test performance? 3. Since ref cannot be used in function components, how does the parent component control the state and methods in the function sub components? 4. What are the differences between createElement and cloneElement, and w ...

Posted by hoodlumpr on Mon, 25 Apr 2022 09:38:54 +0300

JavaScript advanced programming version 4 -- functions

Chapter 10 functions Function creation (the following three functions are equivalent) //Function declaration function sum (num1, num2) { return num1 + num2; } //Function expression let sum = function(num1, num2) { return num1 + num2; }; //Anonymous function let sum = (num1, num2) => { return num1 + num2; }; 10.1 arrow function ...

Posted by Crayon Violent on Mon, 25 Apr 2022 07:03:55 +0300

Three.js - light source

light source In order to simulate the style of objects in different situations, three JS provides a variety of light sources. It should be noted that the light source and material are mutual. In short, the color of the object surface is the product of the light source and material. The base material in the material is not affected by the light ...

Posted by Unholy Prayer on Mon, 25 Apr 2022 05:48:54 +0300

Bitwise operators in Js

Bitwise operators in Js The number type of JavaScript is double precision IEEE 754 64 bit floating-point type, but the bit operator in bit operation is used for 32-bit numbers. Any number operation will be converted to 32-bit, and the operation result will be converted to Js number type. describe The operands of all bitwise operators are conver ...

Posted by cspgsl on Mon, 25 Apr 2022 00:11:51 +0300

In fact, it is not so difficult for webpack to compile the "modular" source code

We are webpack first experience This article demonstrates that the browser does not support CommonJS and only supports Es Module in specific scenarios, and webpack can parse these modular codes into syntax recognized by the browser.So how does webpack deal with modularity? Let's have a look.Project structuredemo ├─ src │ ├─ utils │ │ ...

Posted by GiaTuan on Sun, 24 Apr 2022 15:41:52 +0300

js knowledge point dom node

1, dom node type 1. Element node 2. Attribute node 3. Text node 2, View element nodes 1. View node name Node object nodeName console.log(oDiv.nodeName); //Node name DIV 2. View label name Node object tagName; console.log(oDiv.tagName); //Label name DIV 3. View node type Node object nodeType; Return val ...

Posted by Rohlan on Sun, 24 Apr 2022 15:20:05 +0300

Rendering flow of Vue components

Introduction and examples When we create Vue instances, we use new Vue and this_ Init (options) method to initialize, and then execute $mount, etc. can the components use the same set of logic to process when rendering components? A: Yes, of course. You need to use Vue Extend method. Take an example that can be used in work: Requirements: w ...

Posted by kigroy on Sun, 24 Apr 2022 12:36:07 +0300