Next.js 14 项目中的警告:“内部 React 错误:缺少预期的静态标志。请通知 React 团队。在 MenuBar 组件中。

Warning in Next.js 14 Project: "Internal React error: Expected static flag was missing. Please notify the React team. At MenuBar component."

提问人:Malik 提问时间:11/17/2023 最后编辑:Malik 更新时间:11/17/2023 访问量:13

问:

这个警告是需要担心的还是已经修复了? 任何帮助都不胜感激。

我在网上搜索了答案,但没有找到。

我的代码:

import { Button } from "../components/ui/button";
import { FaListOl, FaListUl, FaUndo, FaRedo, FaCode } from "react-icons/fa";
import { BsEraser } from "react-icons/bs";
import useMyStore from "../app/(store)/store";
import { useEffect } from "react";

export default function MenuBar({ editor }) {
    if (!editor) {
      return null;
    }
  
    const { activeNote } = useMyStore();
  
    useEffect(() => {
      editor.commands.setContent(`
      <h1>${activeNote.title}</h1>${activeNote.content}`);
    }, [activeNote]);
  
    return (
      <div className="p-4">
        <div className="flex flex-wrap gap-2">
          <Button
            variant="outline"
            onClick={() => editor.chain().focus().toggleBold().run()}
            disabled={!editor.can().chain().focus().toggleBold().run()}
            className={`${editor.isActive("bold") ? "is-active" : ""}`}
          >
            B
          </Button>
...
reactjs next.js 警告 next.js13 提示

评论


答: 暂无答案