I hereby claim:
- I am maraisr on github.
- I am marais (https://keybase.io/marais) on keybase.
- I have a public key whose fingerprint is B193 8745 C473 F0EE E62C 0593 B878 42CB 66A2 30FF
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| import { MutableRefObject, useMemo } from 'react'; | |
| export const useForkedRef = <T = Element>(...refs: Array<MutableRefObject<T>>): (node: T) => void => | |
| useMemo(() => { | |
| if (refs.every(ref => ref == null)) { | |
| return null; | |
| } | |
| return node => { | |
| refs.forEach(ref => { |
| /* | |
| Makes your remote containers low level API accessible via: | |
| import accessFederatedContainer from "access-federated-containers"; | |
| accessFederatedContainer("app2") | |
| */ | |
| /** @typedef {import("webpack").Compiler} Compiler */ | |
| /** @typedef {import("webpack").Compilation} Compilation */ |
| function makePromisibleStream(streamable) { | |
| return { | |
| async then(resolve) { | |
| const stream = streamable(); | |
| const returns = []; | |
| for await (const i of stream) { | |
| returns.push(i); | |
| } |
| import { Octokit } from '@octokit/rest'; | |
| const client = new Octokit({ | |
| auth: process.env.GITHUB_TOKEN, | |
| }); | |
| const repos = await client.repos.listForUser({ | |
| username: 'maraisr', | |
| per_page: 200, | |
| }); |
| type FileType = string | Buffer | URL; | |
| type DataType = string | Buffer; | |
| declare function writeFile(path: FileType, body: DataType, content_type?: string): Promise<void>; | |
| declare function writeFileSync(path: FileType, body: DataType, content_type?: string): void; | |
| export { writeFile, writeFileSync }; |
| const localeMap = { | |
| AU: "/au", | |
| US: "/us", | |
| GB: "/uk", | |
| NZ: "/nz", | |
| MX: "/es-mx", | |
| "*": "/au", | |
| }; | |
| addEventListener( |
| import { useEffect, useRef } from 'react'; | |
| function getItem(storage, key) { | |
| const value = storage.getItem(key); | |
| if (!value) return null; | |
| try { | |
| return JSON.parse(value); | |
| } catch (error) { |
While the public API intended for users to use is the scheduler package, the reconciler currently
does not use scheduler's priority classes internally.
ReactFiberScheduler has its own internal "mini-scheduler" that uses the scheduler package
indirectly for its deadline-capable scheduleCallback.
This is kind of a documentation of implementation details that I suppose will be gone by the end of the year, but what can you do.