Encapsulating mobx 6 + typescript to realize React state management -- mobx encapsulation

explain Compared with the centralized state management of redux, mobx is more concise and flexible in concept. We only need to create an "observable" object, and then turn the component into an "Observer" to monitor the changes of observable objects and respond. But for the convenience of teamwUTF-8...

Posted by Frozen Kiwi on Sat, 15 May 2021 09:01:02 +0930

Gof's 23 design patterns

The most important factors of living happily are having something to do in life, having someone to love, and having hope in life—— Joseph Addison Singleton modePrototype modeSimple factory modelFactory method modelAbstract factory pattern Singleton mode Definition of Singleton pattern: a patterUTF-8...

Posted by paulmo on Mon, 24 May 2021 04:49:58 +0930

Decisive battle front end algorithm tree structure foundation union search set

Index of this series Fundamentals of linear tables Linked listqueueStack Tree structure foundation Binary treeHeap and priority queueAnd check the collection To be continued Union lookup set definition Parallel search is a kind of data structure to solve the problem of connectivity. Different dUTF-8...

Posted by mark_and_co on Sat, 12 Jun 2021 03:39:10 +0930

All kinds of properties, methods, abstract classes and polymorphism in TypeScript class of web front end

catalogue 1, Classes in TypeScript 2, Class inheritance in TypeScript 3, Public, private, and protected modifiers in TypeScript 4, Static methods in TypeScript 5, Inheritance and polymorphism in TypeScript 1, Classes in TypeScript class Persons { name: any; age: number | undefined; constructor(UTF-8...

Posted by alfonsomr on Sat, 19 Jun 2021 04:10:28 +0930

Babel actual combat: four running configuration schemes developed by Babel in Node environment

Babel actual combat: four running configuration schemes developed by Babel in Node environment A series of articles Getting started with Babel: the next generation compiler for JavaScriptBabel application: using @ babel/register to realize immediate compilation (using import/export ES6 syntax iUTF-8...

Posted by jwilliam on Sun, 20 Jun 2021 05:25:09 +0930

Introduction to the concept of TypeScript Mixins

Mixins In addition to the traditional OO hierarchy, another popular way to build classes from reusable components is to build them by combining simpler partial classes. You may be familiar with the idea of mixin s or features of languages like Scala, and this pattern is also popular in the JavaUTF-8...

Posted by crazycoders on Fri, 02 Jul 2021 04:45:15 +0930

Basic knowledge of TypeScript: Class

Properties and methods of class 1 In object-oriented language, class is a kind of construction of object-oriented computer programming language. It is the blueprint of creating objects and describes the common properties and methods of the created objects. In TypeScript, we can define a Class UTF-8...

Posted by DaZZleD on Tue, 13 Jul 2021 02:44:41 +0930

Fundamentals of typescript: Decorator use

1. Decorators 1. Concepts Decorators allow programmers to write meta-information to introspect code.The best scenario for using an ornament is cross-cutting focus - face-to-face programming. Aspect Oriented Programming (AOP) is a programming paradigm that allows us to separate crosscutting conUTF-8...

Posted by John Cartwright on Wed, 14 Jul 2021 08:04:25 +0930

JS practice: learn about 5 file upload scenarios in one article (React + Koa Implementation)

JS practice: learn about 5 file upload scenarios in one article (React + Koa Implementation) preface Today, I'd like to share with you five common file upload scenarios, from simple to deep, and take them carefully (the sample code warehouse also comes with a server implemented by koa, which isUTF-8...

Posted by Kitara on Sat, 24 Jul 2021 06:30:52 +0930

Mapping type of TypeScript

The official documents of TypeScript have already been updated, but the Chinese documents I can find are still in the older version. Therefore, some newly added and revised chapters are translated and sorted out.This translation is compiled from "TypeScript Handbook" Mapped Types "Chapter.This UTF-8...

Posted by donnierivera on Wed, 08 Dec 2021 10:29:21 +1030