| name | no-use-effect |
|---|---|
| description | Enforce the no-useEffect rule when writing or reviewing React code. ACTIVATE when writing React components, refactoring existing useEffect calls, reviewing PRs with useEffect, or when an agent adds useEffect "just in case." Provides the five replacement patterns and the useMountEffect escape hatch. |
๐ป
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ใ่ง่ฒ1ใ ไปๅคฉๅฐฑๅฐๆญคไธบๆญขๅง | |
| ใ่ง่ฒ2ใ ไปๅคฉๅฐฑๅฐๆญคไธบๆญขๅง | |
| ใ่ง่ฒ3ใ ไปๅคฉๅฐฑๅฐๆญคไธบๆญขๅง | |
| ใ่ง่ฒ4ใ ไปๅคฉๅฐฑๅฐๆญคไธบๆญขๅง | |
| ใ่ง่ฒ5ใ ไปๅคฉๅฐฑๅฐๆญคไธบๆญขๅง | |
| ใ่ง่ฒ6ใ ไปๅคฉๅฐฑๅฐๆญคไธบๆญขๅง | |
| ใ่ง่ฒ7ใ ไปๅคฉๅฐฑๅฐๆญคไธบๆญขๅง | |
| ใ่ง่ฒ8ใ ไปๅคฉๅฐฑๅฐๆญคไธบๆญขๅง | |
| ใ่ง่ฒ9ใ ไปๅคฉๅฐฑๅฐๆญคไธบๆญขๅง | |
| ใ่ง่ฒ10ใ ไปๅคฉๅฐฑๅฐๆญคไธบๆญขๅง |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft,elem.offsetTop,elem.offsetWidth,elem.offsetHeight,elem.offsetParent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from "react"; | |
| const scaleWidth = 500; | |
| const scaleHeight = 500; | |
| function draw(canvas, scaleX, scaleY) { | |
| const context = canvas.getContext("2d"); | |
| context.scale(scaleX, scaleY); | |
| context.clearRect(0, 0, canvas.clientWidth, canvas.clientHeight); |
Charles Proxy Map Remote over HTTP or HTTPS
The Map Remote tool changes the request location, per the configured mappings, so that the response is transparently served from the new location as if that was the original request.
Using this feature for http resources does't require anything else apart from just configuring your Map Remote entry.
Always make sure you are clearing your cache before you test. Even if Charles is configured properly you might not see the changes unless the browser gets the resource again from the server and not for its local cache.
javascript:(function(){
allowCopyAndPaste = function(e){
e.stopImmediatePropagation();
return true;
};
document.addEventListener('copy', allowCopyAndPaste, true);
document.addEventListener('paste', allowCopyAndPaste, true);
document.addEventListener('onpaste', allowCopyAndPaste, true);
})(); People
:bowtie: |
๐ :smile: |
๐ :laughing: |
|---|---|---|
๐ :blush: |
๐ :smiley: |
:relaxed: |
๐ :smirk: |
๐ :heart_eyes: |
๐ :kissing_heart: |
๐ :kissing_closed_eyes: |
๐ณ :flushed: |
๐ :relieved: |
๐ :satisfied: |
๐ :grin: |
๐ :wink: |
๐ :stuck_out_tongue_winking_eye: |
๐ :stuck_out_tongue_closed_eyes: |
๐ :grinning: |
๐ :kissing: |
๐ :kissing_smiling_eyes: |
๐ :stuck_out_tongue: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Pulled from https://stackoverflow.com/questions/18641864/git-bash-shell-fails-to-create-symbolic-links | |
| # https://stackoverflow.com/users/124119/camilo-martin | |
| # Detect windows (assumes we are in 'msysgit' or similar). | |
| windows() { [[ -n "$WINDIR" ]]; } | |
| # Cross-platform symlink function. | |
| # With one parameter, it will check whether the parameter is a symlink. | |
| # With two parameters, it will create a symlink to a file or directory, | |
| # with syntax: link $linkname $target |
Steps to publish a npm package to beta that won't be available via latest and won't auto install on ncu updates etc
- Ensure any compile is run
npm run distetc - Modify version in package.json to the following format (match with existing verion numbers etc)
"version": "0.1.120-beta.1"where beta.x is the number of those betas - Publish to npm
npm publish --tag beta
There are two options for install:
- Always install beta with
npm install packagename@beta - Install specific version with
npm install package@0.1.120-beta.1
NewerOlder