[Question]Develop new feature
Closed this issue · 2 comments
Hi,
Thank for your great lib, it's very useful. I got a question on developing new feature.
I forked the code and make some changes, rebuild and refer it to my code, it keeps saying
" Element ref was specified as a string (browser) but no owner was set. You may have multiple copies of React loaded. (details: https://fb.me/react-refs-must-have-owner). "
Can you give me some advices to solve this problem.
Regards.
Hi Tuan,
If you used npm link
or yarn link
with your project where react-keyed-file-browser
is used make sure that you only have a single node_modules
directory from the project you're transpiling (assuming you're using webpack). If a node_modules
directory exists within any of your sub-directories it might be picking up that version of react as well.
Alternatively it could be a usage of ref
in browser.js
or table.js
Change ref="newName"
to "ref={el => { this.refs.newName = el }}and
ref="browser" to "ref={el => { this.refs.browser = el }}
As some of the code we use hasn't been updated in a while we haven't moved everything to the new react ref style.
Hope this helps.
Very thank @scaredcat, let me close this topic