Tag:Delayering

  • ES6 what you don’t know

    Time:2022-5-1

    Modify one or more items in the arrayfill Value: the value to be filled in (required)Start: the position to start filling (optional)End: stop filling position;The default is array length(optional) let arr = [1, 2, 3, 4, 5] arr.fill(6,6,7) Flatten arrays flat var arr = [555,[888,[99]], , 999]; console.log(arr.flat(Infinity)) // [555, 888, 99, 999] flat()By default, only […]

  • Practice of scroll list encapsulation in react & Redux

    Time:2022-4-4

    I’ve been writing a front-end project to share some practices of scroll encapsulation design goal Because the project requires a large number of scroll list like pages, listview pages: After reading the circle on GitHub, I felt that I didn’t particularly like it, so I encapsulated it myselfThe hierarchy is as follows: |-Scroll // mainly […]

  • [recommended] flat design, jQuery UI Library Wait (English)

    Time:2022-2-14

    Introduction to flat design:http://www.sitepoint.com/getting-started-flat-ui-design/ “5 jQuery UI libraries”:http://www.sitepoint.com/top-5-jquery-ui-alternatives/ “Boilerplate or bootstrap?”:http://www.sitepoint.com/boilerplate-bootstrap/ “Top ten reasons for using angularjs”:http://www.sitepoint.com/10-reasons-use-angularjs/ “My first Kindle book: case tutorial”:http://www.sitepoint.com/first-kindle-book-case-study/

  • The show summary in the table component in elementui does not take effect

    Time:2022-1-23

    I The data given to me by the backend is in the following format: “data”: [ { “code”: “\”xiaoxue\””, “Name”: “\” primary school \ “, “question”: { “entryCount”: 1000, “processCount”: 1000, “reviewCount”: 1000, “publishCount”: 1000 },…] It is found that when traversing data in the table component, when the data is written as props: ‘question […]

  • Axios source code (VII)

    Time:2021-12-28

    Today, let’s look at the dispatchrequestDispatchrequest is a function that accepts config as a parameter. The core is to send the request using the adapter (attribute in config) method, and then convert the returned data Because it is promise, a response is returned successfully, and a reject error is returned if it fails ‘use strict’; […]

  • Git advanced command

    Time:2021-11-28

    1: View the submission history git for-each-ref –sort=committerdate refs/heads/ –format=’%(HEAD) %(color:yellow)%(refname:short)%(color:reset) – %(color:red)%(objectname:short)%(color:reset) – %(contents:subject) – %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))’ Rank the local shares in the GIT commit submission order. You can use this command to delete some parts that have not been used for a long time. 2: Flattening merge git merge –squash In fact, it […]

  • Simply explore the mechanism of NPM

    Time:2021-11-22

    What can you get from this article? NPM installation mechanism, that is, what is done when executing the install command? The cache strategy of NPM is briefly introduced here, but it is not in-depth. NPM dependency management, that is, how do we install dependencies on node each time_ Modules? What is the use of lock […]

  • Generator, async / await syntax

    Time:2021-11-10

    Generator functions are more than ordinary functions*(asterisk). Calling a generator function does not immediately itself, but gets a generator object until it is callednext()method. function * fn(){ console.log(“print”) const res = yield ‘foo’; console.log(res); try{ … }catch(e){ console.log(e); } } const generator = fn(); generator.next(‘para’); generator.throw(new Error(‘handle throw’)); Function body can be addedyieldKeyword, which is […]

  • Rust: join, and concat

    Time:2021-11-5

    Rust’s higher-order functions are used frequently and often encounter “flattening” dimensionality reduction. At this time, the role of join and concat is obvious. Often may be used. 1、 See the official standard library documentation for instructions concat: fn concat(&self) -> Self::Output Flattens a slice of T into a single value Self::Output. Examples assert_eq!([“hello”, “world”].concat(), “helloworld”); […]

  • Learn Apollo client Series in 21 minutes: storage details of Apollo store

    Time:2021-6-27

    Learning Apollo client in 21 minutes is a series, simple violence, package learning and package meeting. Build Apollo client and integrate ReduxUsing Apollo client to get dataModify local Apollo store dataProvide customized solutions Request interception Encapsulation and modification of client APIApollo store storage details Failure analysis and solution of writing to store The principle of […]

  • A simple method of flattening JS array

    Time:2020-1-15

    Delayering In a word, array flattening refers to changing a multidimensional array (including nesting) into a one-dimensional array Flattening Es5 toString const arr = [1, 2, 3, [4, 5, [6, 7]]]; const flatten = arr.toString().split(‘,’); console.log(flatten); Advantages: simple, convenient, no impact on the original data Disadvantages: it’s better that array elements are all numbers or […]