I hereby claim:
- I am vincentriemer on github.
- I am vincentriemer (https://keybase.io/vincentriemer) on keybase.
- I have a public key ASBbyFx0Y416Yh_pdSHCOTmkEOVLG0rnocD-kCKgd7KKjQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
(() => { | |
window.history.pushState("BackHandler", null, null); | |
window.onpopstate = () => { | |
if(document.dispatchEvent(new Event("hardwareBackPress")) { | |
window.history.back(); | |
} else { | |
window.history.pushState("BackHandler", null, null); | |
} |
/** | |
* This is the "native" module that runs on the main thread | |
* To add this to the bridge the exported class gets added to the `nativeModules` array in the `bootstrap.js` file. | |
* | |
* @flow | |
*/ | |
import { | |
RCT_EXPORT_METHOD, | |
RCT_EXPORT_MODULE, |
React Wormhole Registry Entry* | |
Unmounted* | |
Empty* | |
container registered -> Has Container | |
Has Container | |
target registered -> Mounted |
import React, { useContext, useLayoutEffect, useEffect, useRef } from "react"; | |
import GatewayRegistry from "./GatewayRegistry"; | |
import { GatewayContext } from "./GatewayProvider"; | |
const Gateway = props => { | |
const gatewayRegistry = useContext(GatewayContext); | |
// keeping track of previous `into` prop | |
const prevIntoRef = useRef(); | |
useLayoutEffect(() => { |
import React from "react"; | |
import { usePress } from "./usePress"; | |
export const MyJSButton = () => { | |
const [pressRef, isPressed, accessibilityProps] = usePress( | |
"button", // role [button | link] | |
() => console.log("Pressed!"), // callback | |
true // should preventDefault | |
); |
import ReactDOM from "react-dom"; | |
export default ReactDOM.unstable_batchedUpdates; |
// Global import to register <virtual-scroller /> custom element | |
// This should be replaced with a layered import once it is introduced into browsers | |
import "virtual-scroller/src/virtual-scroller"; | |
import React, { | |
useRef, | |
useEffect, | |
forwardRef, | |
useImperativeMethods | |
} from "react"; |
import * as path from "path"; | |
import * as fs from "fs"; | |
export default function netlifyModulePreload(config) { | |
return { | |
name: "netlify-modulepreload", | |
generateBundle(outputOptions, bundle) { | |
const { publicRoot, entries } = config; | |
const { dir, format } = outputOptions; |
import React, { Component, useCallback, useState, useRef } from "react"; | |
import "./App.css"; | |
const imgUrl = require("./assets/iPhone-XS-Portrait-Space-Gray.png"); | |
const fullSize = { | |
width: 1325, | |
height: 2616 | |
}; |