選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

useShapesToRender.ts 409B

12345678910111213
  1. import { useSelector } from 'state'
  2. import { getShapeUtils } from 'state/shape-utils'
  3. import { deepCompareArrays, getPage } from 'utils'
  4. export default function useShapesToRender(): string[] {
  5. return useSelector(
  6. (s) =>
  7. Object.values(getPage(s.data).shapes)
  8. .filter((shape) => shape && !getShapeUtils(shape).isForeignObject)
  9. .map((shape) => shape.id),
  10. deepCompareArrays
  11. )
  12. }