Why does React-Magic-Move example break in JSFiddle with “Only a ReactOwner can have refs” error?

戏子无情 提交于 2019-12-05 10:45:49

This is what I did to get the examples working locally

git clone git@github.com:ryanflorence/react-magic-move.git
cd react-magic-move
npm install
scripts/dev-examples

now open up http://localhost:8080/basic/ in your browser, and it works somehow

moebious

I had a similar situation with a different react module. What we did was add an alias to our webpack.config.js named react that pointed to our node_modules/react. This keeps any other instances of react from loading. It would look like this

alias: {
    'react': path.join(__dirname, 'node_modules', 'react')
},
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!