随笔分类 - ECMAScript
摘要:https://kapeli.com/mdn_offline https://developer.mozilla.org/en-US/docs/MDN/About#Downloading_content https://stackoverflow.com/questions/9501882/mdn-
阅读全文
posted @ 2020-11-28 08:11
fndefbwefsowpvqfx
摘要:var fs=require('fs'); const lineReader = require('line-reader'); var reg = /<a href=.*?(?=('>))/g; var reg2 = /(?<=('>))[0-9a-z_A-Z]*?(?=<\/a)/g; /* l
阅读全文
posted @ 2020-11-26 23:12
fndefbwefsowpvqfx
摘要:instance Point.prototype Point.__proto__ Function.prototype Function.__proto__ Object.prototype Object.__proto__
阅读全文
posted @ 2020-11-06 09:56
fndefbwefsowpvqfx
摘要:   { this.x = x; this.y = y;
阅读全文
posted @ 2020-11-05 22:32
fndefbwefsowpvqfx
摘要:() => { const stringifyData = data => JSON.stringify(data, null, 2) const initialData = stringifyData({ data: null }) const [data, setData] = useState
阅读全文
posted @ 2020-10-26 13:18
fndefbwefsowpvqfx
摘要:A custom Hook is a JavaScript function whose name starts with ”use” and that may call other Hooks import { useEffect, useCallback } from "react"; // C
阅读全文
posted @ 2020-10-26 13:16
fndefbwefsowpvqfx
摘要:useMemo returns a memoized value. Pass a “create” function and an array of dependencies. useMemo will only recompute the memoized value when one of th
阅读全文
posted @ 2020-10-26 13:15
fndefbwefsowpvqfx
摘要:useLayoutEffect has the very same signature as useEffect. useLayoutEffect(effectFunction, arrayDependencies) () => { const [randomNumber, setRandomNum
阅读全文
posted @ 2020-10-26 13:13
fndefbwefsowpvqfx
摘要:useCallback returns a memoized callback. const memoizedCallback = useCallback(function, arrayDependency) const App = () => { const [age, setAge] = use
阅读全文
posted @ 2020-10-26 13:12
fndefbwefsowpvqfx
摘要:returns a 'ref' object. const refContainer = useRef(initialValueToBePersisted) Value is persisted in the refContainer.current property. values are acc
阅读全文
posted @ 2020-10-26 13:10
fndefbwefsowpvqfx
摘要:useReducer may be used as an alternative to useState. const [state, dispatch] = useReducer(reducer, initialState, lazyInitFunction) Ideal for complex
阅读全文
posted @ 2020-10-26 13:08
fndefbwefsowpvqfx
摘要:useContext saves you the stress of having to rely on a Context consumer. const contextValue = useContext(contextObject) // consuming context via a con
阅读全文
posted @ 2020-10-26 13:07
fndefbwefsowpvqfx
摘要:useEffect accepts a function which can perform any side effects. useEffect(effectFunction, arrayDependencies) 每次绘制都执行 Without an array dependency, the
阅读全文
posted @ 2020-10-26 13:05
fndefbwefsowpvqfx
摘要:useState lets you use local state within a function component. The setState function is used to update the state. It accepts a new state value and enq
阅读全文
posted @ 2020-10-26 13:04
fndefbwefsowpvqfx
摘要:插件安装 安装 Debugger for Chrome attach debug debug 模式启动chrome debug模式启动chrome,注意,chrome需要在path中存在,不存在配置下。 chrome --remote-debugging-port=9222 配置launch lau
阅读全文
posted @ 2020-10-23 09:41
fndefbwefsowpvqfx
摘要:const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); //installed via npm const webpack = require('webpack'); //to a
阅读全文
posted @ 2020-08-12 16:05
fndefbwefsowpvqfx
摘要:no network npm config set registry https://registry.npm.taobao.org/ npm config set disturl https://npm.taobao.org/dist/ npm config set electron_mirror
阅读全文
posted @ 2020-08-12 15:56
fndefbwefsowpvqfx
摘要:////////////////// //// debug模式启动浏览器 ////////////////// 以debug模式启动浏览器,才可以attach成功,启动前需要退出chrome Windows Right click the Chrome shortcut, and select pr
阅读全文
posted @ 2018-07-31 11:55
fndefbwefsowpvqfx

浙公网安备 33010602011771号