How can I suppress “The tag is unrecognized in this browser” warning in React?

前端 未结 4 695
梦如初夏
梦如初夏 2021-02-13 05:58

I\'m using elements with custom tag names in React and getting a wall of these errors. There\'s a GitHub issue on the subject (https://github.com/hyperfuse/react-anime/issues/3

4条回答
  •  日久生厌
    2021-02-13 06:09

    I don't believe there's a built in way to suppress the error message.

    The warning message is logged right here in react-dom. You could fork react-dom and simply remove the error message. For a change as small as this, perhaps using something like patch-package would be useful, so you don't have to maintain a fork.

提交回复
热议问题