• The pits that useeffect walked through


    Write in front   in react, there are two components: function component and class component. One of the differences between the two is that class components have a life cycle, while function components do not inherit react Component, so the function componentNo life cycle。 So you check the documentation and find that using useeffect can […]

  • Initial react: how do we create a react application


    Article catalogue Understand the basic concepts of react Describe the UI using components Managing state using state and props Understanding the essence of JSX grammar Create a react application using scaffolding tools Actual combat: send request and display data in component Summary Understand the basic concepts of react React itself is actually a very simple […]

  • Cache architecture in distributed system


    Caching is an old-fashioned technology. In the case of high concurrent reads, it can be described as a silver bullet against traffic for read services. Three sharp tools for high concurrency: caching, current limiting and degradation. Today, let’s talk about caching. For caching, my understanding is to make the data closer to the user, in […]

  • Uniapp wechat official account web page silent authorization / non silent authorization


    First of all, we need to obtain user information, mainly the unique value of openid, which can be used for user login, payment and other functions. At this time, we need to carry out web page authorization to obtain user information and openid Static authorization snsapi_ Base (do not pop up the authorization page, jump […]

  • Antd Pro react project UMI dev modify the default port number Mac and windows


    windows “Dev”: “set port = 8081 & & NPM run start: dev”, // 8081 takes effect “Start”: “set port = 8080 & & UMI dev” The correct way to write it is “dev”: “set PORT=8081 && npm run start:dev”, “start”: “umi dev”, Mac version Cross env needs to be installed npm install cross-env –save-dev “start”: […]

  • JavaScript advanced programming version 4


    Chapter 1 what is JavaScript 1.2JavaScript The complete JavaScript implementation consists of the following parts Core (ECMAScript) Document object model (DOM) Browser object model (BOM) 1.2.1 ECMAScript ECMAScript, the language defined by ecma-262, is not limited to web browsers. In fact, the language has no input and output methods. Web browser is just a host […]

  • React UMI SSR SSG best practices for using typescript


    explain The UMI document doesn’t mention typescript at all (too bad, it feels like a KPI project),So I can only look at the source code and GitHub to get the definition of TSFinally encapsulated into a typeIUmiPage When using, only two generic types need to be specified (routing parameter type and getinitialprops return value)If not […]

  • The first intimate contact of electron — the past and present life of a data extraction tool (2)


    Continue to talk about my programming process last time. Near August 2021, I first came into contact with JavaScript. To be exact, I should be exposed to HTML, which contains various elements. For a moment, I had the feeling of dreaming back to VB GUI, and the interface was changed. The features that run on […]

  • Browser rendering principle


    process When a program is started, the operating system will allocate memory for the program to store code and data during operation. Such an environment is called process. A process can start and manage multiple threads, and data can be shared between threads. Any thread error may cause the process to crash. Process architecture of […]

  • Redux knowledge points


    Redux Chinese document: https://www.redux.org.cn/Redux is a JavaScript state container that provides predictable state management. It allows you to build consistent applications that run in different environments (client, server, native applications) and are easy to test. Not only that, it also provides a cool development experience. For example, there is a time travel debugger that can […]

  • React uses Redux process and introduces simplified processing scheme


    Redux is hot, but a little cumbersome. We seldom use it in our development. We usually use DVA, mobx or more portable recoil and so on. But you should know Redux or react redux Official website: Redux Chinese document:https://www.redux.org.cn/ quote: npm install –save redux or cnpm install –save redux or yarn add redux Explain: I […]

  • React uses antd to realize the unselectability of date and time


    Antd + typescript + react implementation date and time cannot be selected Demand introduction design sketch code Demand introduction The initial value of the deadline is 2 hours later than the current time, and the latest time is 2 hours later than the deadline. The deadline of job submission is later than the current time […]