按照本教程操作:https://medium.com/superhighfives/an-almost-static-stack-6df0a2791319
构建应用程序后出现此错误:facebook-react-error :
addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's
render
method, or you have multiple copies of React loaded ....
有人知道线索吗?
npm ls React 看起来如下:
`-- react-snapshot@1.0.4
`-- react@15.5.4
最佳答案
我遇到了同样的错误,通过删除解决了它
//= require react-server
来自/app/javascripts/server_rendering.js
此错误的原因通常是重复加载react,您可以阅读in this article
关于reactjs - react 快照 : addComponentAsRefTo(. ..) 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43622273/