Tomato alarm one (the framework of react antd typescript)

1, Main documents React React Router Ant design TypeScript Redux 2, Start using and experience react scaffold npx create-react-app react-app-demo cd react-app-demo yarn start 3, Follow the document Rendering an element ReactDOM.render(<h1>Hello, world!</h1>, document.getElementById('root')); Use of rendering JSX const name = ...

Posted by Niruth on Wed, 12 Feb 2020 08:44:27 -0800

TypeScript design of tool type

TypeScript design of tool type Article directory TypeScript design of tool type Preparatory knowledge Try to solve an interview question Tool type analysis and design considerations How to write training tools? Preparatory knowledge TypeScript advanced type Partial TypeScript advanced type ...

Posted by Azarath on Sun, 02 Feb 2020 22:10:10 -0800

Based on react, react hooks, redux, ts handwritten ant design pro, with supporting api of node, eggjs, ts, mysql, redis

introduce At the beginning, I needed an amdin template developed by react. After finding one side in the open source community, I compared the UI of Ant Design Pro. When I pulled down the code of Ant Design Pro for research, I found that there were too many contents. Besides react and redux, there wer ...

Posted by Spikey on Wed, 29 Jan 2020 02:22:14 -0800

Use.apply() with the'new'operator.Is this possible?

In JavaScript, I want to create an object instance (via the new operator), but pass any number of parameters to the constructor.Is this possible? What I want to do is (but the code below doesn't work): function Something(){ // init stuff } function createSomething(){ return new Something.apply(null, arguments); } var s = createSom ...

Posted by tryingtolearn on Sun, 26 Jan 2020 17:57:58 -0800

Basic introduction module of TypeScript (2)

Reprint Basic introduction module of TypeScript (2) Generate module code According to the module target specified during compilation, the compiler will generate appropriate code for Node.js (CommonJS), require.js (AMD), UMD, SystemJS or ECMAScript 2015 native module (ES6) module loading system. For more information about the define, require, ...

Posted by coffeehead on Sat, 21 Dec 2019 12:44:41 -0800

Hand tear source code series - functor + observer mode + status = Promise

Preface Some time ago, I was too busy to write a blog for nearly a month, but Promise had summed up a wave of how to realize it long ago, but at that time, it was purely for the purpose of realization, without elaborating some of the clever designs. Until recently, when I was learning the knowledge related to functional programming, I found tha ...

Posted by Nightseer on Sun, 15 Dec 2019 12:17:47 -0800

Data flow scheme of transforming old project with dva

Preface Recently, I had some trouble transferring my scaffolding project to TypeScript. Before the project, the system of react + react Redux + Redux thunk + Redux actions + Redux promise was adopted. When a project is converted to TypeScript, react and react Redux are perfect conversions. Redux actions transformation is also initially complete ...

Posted by TonyB on Fri, 13 Dec 2019 04:46:57 -0800

typescript learning notes - Interface

####You need to know One of the core principles of TypeScript is to type check the structure of a value. The purpose of an interface is to name types and define contracts or constraints for code or third-party code. The interface between When to use an interface, let's take a look at the following example. function printLabel(labelledObj: { lab ...

Posted by k994519 on Tue, 10 Dec 2019 02:45:43 -0800

axios unified interface management and optimization

I wrote before An article , sharing the methods of interface management in their own projects. The conclusion is: define interface file -- with Axios export -- call interface method. In this way, the unified management of the interface and the semantics and simplifications of the calling interface are realized.   According to the use in the p ...

Posted by adamhhh on Sun, 08 Dec 2019 14:46:07 -0800

vue3+typescript import external file

There are several ways to introduce external files into vue3+typescript (eg: introduce echarts) The first method: 1. script import in indext.html <div id="app"></div> <script src="https://cdn.bootcss.com/echarts/4.2.1-rc1/echarts-en.common.min.js"></script> 2. Use on. vue page, declare first and then use ...

Posted by xProteuSx on Sat, 30 Nov 2019 13:38:37 -0800