React-hot-loader: react-

后端 未结 6 505
长发绾君心
长发绾君心 2021-02-01 13:14

I updated some npm packages in my Gatsby project and now I\'m seeing this warning in console:

React-hot-loader: react-

6条回答
  •  孤街浪徒
    2021-02-01 13:14

    In short - React-Hot-Loader is something that "might not work". It has a lot of problems and limitations.

    "hot-patch" was created to (first) support new React features, and (second) make it more stable.

    • Without this patch - something really might not work.
    • With the patch - something might work better, especially in the future.

    It's the only our(ok, mine) hope to mitigate the major problems RHL has, and tracked as "version 5" - https://github.com/gaearon/react-hot-loader/milestone/3

    hot-loader/react-dom is not a "third party" lib - it's the same react-dom with some patches applied to dev mode only (you might check build scripts).

    It just moves some dark magic, RHL uses to work, inside react, and actually removes it. RHL == black magic. RHL + patch == twice less magic.

提交回复
热议问题