refactor(workbench): add slider to switch between code or preview (#12)

This commit is contained in:
Dominic Elm
2024-07-25 16:34:27 +02:00
committed by GitHub
parent 5db834e2f7
commit a5ed695cb3
4 changed files with 134 additions and 33 deletions

View File

@@ -0,0 +1,6 @@
import { memo } from 'react';
export const genericMemo: <T extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any>>(
component: T,
propsAreEqual?: (prevProps: React.ComponentProps<T>, nextProps: React.ComponentProps<T>) => boolean,
) => T & { displayName?: string } = memo;