目录
Josh Hawkins

Update frontend to React 19 (#22275)

  • remove unused RecoilRoot and fix implicit ref callback

Remove the vestigial recoil dependency (zero consumers) and convert the implicit-return ref callback in SearchView to block form to prevent React 19 interpreting it as a cleanup function.

  • replace react-transition-group with framer-motion in Chip

Replace CSSTransition with framer-motion AnimatePresence + motion.div for React 19 compatibility (react-transition-group uses findDOMNode). framer-motion is already a project dependency.

  • migrate react-grid-layout v1 to v2
  • Replace WidthProvider(Responsive) HOC with useContainerWidth hook
  • Update types: Layout (single item) → LayoutItem, Layout[] → Layout
  • Replace isDraggable/isResizable/resizeHandles with dragConfig/resizeConfig
  • Update EventCallback signature for v2 API
  • Remove @types/react-grid-layout (v2 includes its own types)
  • upgrade vaul, next-themes, framer-motion, react-zoom-pan-pinch
  • vaul: ^0.9.1 → ^1.1.2
  • next-themes: ^0.3.0 → ^0.4.6
  • framer-motion: ^11.5.4 → ^12.35.0 (React 19 native support)
  • react-zoom-pan-pinch: 3.4.4 → latest
  • upgrade to React 19, react-konva v19, eslint-plugin-react-hooks v5

Core React 19 upgrade with all necessary type fixes:

  • Update RefObject types to accept T | null (React 19 refs always nullable)
  • Add JSX namespace imports (no longer global in React 19)
  • Add initial values to useRef calls (required in React 19)
  • Fix ReactElement.props unknown type in config-form components
  • Fix IconWrapper interface to use HTMLAttributes instead of index signature
  • Add monaco-editor as dev dependency for type declarations
  • Upgrade react-konva to v19, eslint-plugin-react-hooks to v5
  • upgrade typescript to 5.9.3

  • modernize Context.Provider to React 19 shorthand

Replace <Context.Provider value={…}> with across all project-owned context providers. External library contexts (react-icons IconContext, radix TooltipPrimitive) left unchanged.

  • add runtime patches for React 19 compatibility
  • formatting

  • use availableWidth instead of useContainerWidth for grid layout

The useContainerWidth hook from react-grid-layout v2 returns raw container width without accounting for scrollbar width, causing the grid to not fill the full available space. Use the existing availableWidth value from useResizeObserver which already compensates for scrollbar width, matching the working implementation.

  • remove unused carousel component and fix React 19 peer deps

Remove embla-carousel-react and its unused Carousel UI component. Upgrade sonner v1 → v2 for native React 19 support. Remove @types/react-icons stub (react-icons bundles its own types). These changes eliminate all peer dependency conflicts, so npm install works without –legacy-peer-deps.

  • fix React 19 infinite re-render loop on live dashboard

The “Maximum update depth exceeded” error was caused by two issues:

  1. useDeferredStreamMetadata returned a new {} default on every render when SWR data was undefined, creating an unstable reference that triggered the useEffect in useCameraLiveMode on every render cycle. Fixed by using a stable module-level EMPTY_METADATA constant.

  2. useResizeObserver’s rest parameter ...refs created a new array on every render, causing its useEffect to re-run and re-observe elements continuously. Fixed by stabilizing refs with useRef and only reconnecting the observer when actual DOM elements change.

1个月前5360次提交

logo

Frigate NVR™ - 一个具有实时目标检测的本地 NVR

翻译状态

English | [简体中文]

License: MIT

一个完整的本地网络视频录像机(NVR),专为Home Assistant设计,具备 AI 目标/物体检测功能。使用 OpenCV 和 TensorFlow 在本地为 IP 摄像头执行实时物体检测。

强烈推荐使用 GPU 或者 AI 加速器(例如Google Coral 加速器 或者 Hailo等)。它们的运行效率远远高于现在的顶级 CPU,并且功耗也极低。

  • 通过自定义组件与 Home Assistant 紧密集成
  • 设计上通过仅在必要时和必要地点寻找目标,最大限度地减少资源使用并最大化性能
  • 大量利用多进程处理,强调实时性而非处理每一帧
  • 使用非常低开销的画面变动检测(也叫运动检测)来确定运行目标检测的位置
  • 使用 TensorFlow 进行目标检测,并运行在单独的进程中以达到最大 FPS
  • 通过 MQTT 进行通信,便于集成到其他系统中
  • 根据检测到的物体设置保留时间进行视频录制
  • 24/7 全天候录制
  • 通过 RTSP 重新流传输以减少摄像头的连接数
  • 支持 WebRTC 和 MSE,实现低延迟的实时观看

社区中文翻译文档

你可以在这里查看文档 https://docs.frigate-cn.video

赞助

如果您想通过捐赠支持开发,请使用 Github Sponsors

协议

本项目采用 MIT 许可证授权。

代码部分:本代码库中的源代码、配置文件和文档均遵循 MIT 许可证。您可以自由使用、修改和分发这些代码,但必须保留原始版权声明。

商标部分:“Frigate”名称、“Frigate NVR”品牌以及 Frigate 的 Logo 为 Frigate, Inc. 的商标不在 MIT 许可证覆盖范围内。 有关品牌资产的规范使用详情,请参阅我们的《商标政策》

截图

实时监控面板

实时监控面板

简单的核查工作流程

简单的审查工作流程

多摄像头可按时间轴查看

多摄像头可按时间轴查看

内置遮罩和区域编辑器

内置遮罩和区域编辑器

翻译

我们使用 Weblate 平台提供翻译支持,欢迎参与进来一起完善。

非官方中文讨论社区

欢迎加入中文讨论 QQ 群:1043861059

Bilibili:https://space.bilibili.com/3546894915602564

中文社区赞助商

EdgeOne 本项目 CDN 加速及安全防护由 Tencent EdgeOne 赞助


Copyright © 2026 Frigate, Inc.

邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802032778号