import { memo } from "react"; import equal from "fast-deep-equal"; type Props = { list: React.ReactNode[]; }; function RawControlMenu({ list }: Props) { return ( {list.map((control, i) => ( // re-render does not change the order // eslint-disable-next-line react/no-array-index-key
  • {control}
  • ))}
    ); } export const ControlMenu = memo(RawControlMenu, equal);