Skip to content

Instantly share code, notes, and snippets.

View alexeiaccio's full-sized avatar
🐋
Nope

Alexei Accio alexeiaccio

🐋
Nope
View GitHub Profile
@alexeiaccio
alexeiaccio / forwarded.tsx
Created March 16, 2023 10:15
forwardRefOverride
const Comp = <T extends unknown>(props: Props<T>, ref: React.ForwardedRef<unknown>) => {}
declare function forwardRefOverride<T, P = {}>(
render: (props: P, ref: React.Ref<T>) => React.ReactElement | null,
): ((props: P & React.RefAttributes<T>) => React.ReactElement | null)
const _Comp = (React.forwardRef as typeof forwardRefOverride)(Comp);
export { _Comp as Comp };
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@alexeiaccio
alexeiaccio / machine.js
Created February 12, 2020 11:46
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions