• Do you really understand export default?


    export default Aandexport { A as default }At first glance, it looks the same, but there are some subtle differences. It is easier to leave a hole. This paper introduces the differences between the two writing methods. importStatement imports a reference, not a value If there is an export, there must be an import. Let’s […]

  • Five years ago, I learned null and undefined. Now I have a new understanding. Let’s see what this talent says?


    By Michael ThiessenTranslator: front end XiaozhiSource: dev Dream, dry goods, wechat search[move to the world]Pay attention to this dish brushing wisdom who is still doing dishes in the early morning. This article GitHubhttps://github.com/qq449245884/xiaozhiIt has been included. There are complete test sites, materials and my series of articles for the interview of front-line large factories. Many […]

  • ES6 must know, look! (1)


    Those programmers must know ES6 knowledge. Come and see if you can do it? ECMAScript 6 has basically become the industry standard, and its popularity is much faster than Es5. The main reason is that modern browsers support ES6 very quickly, especially chrome and Firefox browsers, which already support most of the features in ES6. […]

  • Vue3 writing method


    Vue3 supports three writing methods Option API (same as vue2) Composition API (writing method of setup() function) < script setup > (syntax sugar of composition API) Here we mainly talk about some writing methods of < script setup >, which is recommended because it is relatively concise Differences between ref, reactive, toref and torefs Ref […]

  • Variable structure assignment in ES6


    The last article of Xiaobian updated the problem of variable definition in ES6. This article continues to some practical dry goods, such as the assignment of arrays and objects. Especially in the front-end and back-end cooperation projects, the splitting of back-end data and the inert assignment of the default value of the function. After reading […]

  • Functional components and class components


    There is no difference in use, but there is a slight difference in creationRobot functional components: import React from “react”; import styles from “./robot.module.css” interface RobotProps { id: number; name: string; email: string; } //Robot is defined as a function component and a generic type, which can be written as {props}. Propt is used to […]

  • New features of c# 7.0 (quick view version)


    《New features of c# 7》I spent a lot of time to introduce the 9 new features of c# 7.0. Here I will give a quick introduction to them through examples according to the project experience, so that you can understand them in a short time. In general, these new features make it easier for c# […]

  • Object types of typescript


    preface The official documents of typescript have long 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 article is compiled from the chapter “object types” in typescript Handbook. This article is not translated strictly according to […]

  • Five rules for writing JS conditional statements


    When working with JavaScript, we often deal with conditional statements. Here are five suggestions for you to write better / cleaner conditional statements.catalog:1. Use array when making multiple judgments includes2. Less nesting, return as soon as possible3. Use default parameters and Deconstruction4. Tend to traverse objects rather than switch statements5. Use array for all / […]

  • Lecture 18-20, vue3 X composition API details


    1、 Brief introduction to composition API Composition API, also known as composite API, is vue3 New features of X. By creating Vue components, we can extract the repeatable parts of the interface and its functions into reusable code segments. This alone can take our applications further in terms of maintainability and flexibility. However, our experience […]

  • Vue 3: find out ref reactive toref torefs


    reactive reactiveThe incoming object is wrapped to create a copy of the objectProxyAgent. It is a responsive copy of the source object,Not equal to original object。 It “deeply” transforms all nested properties of the source object, unpacks and maintains any of themrefReference relationship. reactive APIWell solved vue2 passdefinePropertyDefects in realizing data response. It is also […]

  • Common skills in ES6


    Tips commonly used in ES6 Mandatory parameters ES6 provides a default parameter value mechanism, which allows you to set default values for parameters to prevent these parameters from being passed in when the function is called. In the following example, we write a required () function as the default values for parameters a and B. […]