$$_INTERNAL_MATHRANDOMSTART${Math.random()}MATHRANDOMEND$$_INTERNAL__
"use strict";
"$$INTERNAL_MATHRANDOMSTART".concat(Math.random(), "MATHRANDOMEND$$INTERNAL");
function App() { | |
// Notice the callback passed to component will be a new reference | |
// on every rerender for both the callbacks | |
function callback() { | |
// some logic | |
} | |
function callback2() { | |
// some logic | |
} |
function useQRCodeScan({ | |
qrcodeMountNodeID = "", | |
closeAfterScan = true, | |
getQrBoxDimension, | |
}) { | |
const [decodedQRData, setDecodedQrData] = useState({ | |
isScanning: false, | |
isScanSuccess: false, | |
isScanFailure: false, | |
data: null, |
let options = { | |
root: document.querySelector("#scrollArea"), // null | |
rootMargin: "0px 0px 0px 0px", | |
threshold: 1.0 // [0, 0.25, 0.50, 0.75, 1] | |
}; | |
let observer = new IntersectionObserver(callback, options); | |
let target = document.querySelector("#listItem"); | |
observer.observe(target); | |
observer.unobserve(target); |
var t = "test" | |
t = s[Symbol.iterator]() | |
t.next() // t | |
t.next() // e | |
t.next() // s | |
t.next() // t | |
t.next() // done: true |
useWhatChanged([a, b, c, d], 'a, b, c, d'); // debugs the below useEffect |
1. get list of remote tags | |
git ls-remote --tags origin | |
2. get list of local tags | |
git tag | |
3. remove local tag | |
git tag -d <tag name> | |
4. delete remote tag |
const bypass = [ | |
// function names to avoid logging | |
]; | |
const collapsed = [ | |
// function names to groupCollapsed | |
]; | |
module.exports = function(babel) { | |
const { types: t } = babel; | |
const wrapFunctionBody = babel.template(`{ |
import { utcToZonedTime, format as formatTimeZone } from 'date-fns-tz'; | |
//'America/Los_Angeles' | |
// const utcString = '2019-09-25T12:00:00.000Z'; | |
function getTimeZoneText(utcString) { | |
try { | |
const timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone; | |
if (Intl) { | |
const zoneDateObj = utcToZonedTime(utcString, timeZone); |
let callback = (entries, observer) => { | |
entries.forEach(entry => { | |
// Each entry describes an intersection change for one observed | |
// target element: | |
// entry.boundingClientRect | |
// entry.intersectionRatio | |
// entry.intersectionRect | |
// entry.isIntersecting | |
// entry.rootBounds | |
// entry.target |