glittershark / reactable

Fast, flexible, and simple data tables in React
glittershark.github.io/reactable
MIT License
1.51k stars 223 forks source link

React.DOM.tr deprecation warning in React v16.0+ #381

Open jasonblanchard opened 7 years ago

jasonblanchard commented 7 years ago

After upgrading to React v15.6.1, I'm seeing this deprecation warning:

lowPriorityWarning.js:40 Warning: Accessing factories like React.DOM.tr has been deprecated and will be removed in v16.0+. Use the react-dom-factories package instead.  Version 1.0 provides a drop-in replacement. For more info, see https://fb.me/react-dom-factories
printWarning    @   lowPriorityWarning.js:40
lowPriorityWarning  @   lowPriorityWarning.js:59
React.DOM.(anonymous function)  @   React.js:123
render  @   tr.js:78
...
...

Looks like tr.js:78 is a Reactable file.

I'm not sure if using react-dom-factories is the best solution here or refactoring it to avoid the call altogether.

stclairdaniel commented 6 years ago

@glittershark React 16 is out. Any updates here?

vladnicula commented 6 years ago

Breaks on react 16. How can we help? :)

vladnicula commented 6 years ago

Opened PR for this. It solved the issue for me https://github.com/glittershark/reactable/pull/389

abdulrahman-khankan commented 6 years ago

@glittershark could you please approve the PR?

andrewlorenz commented 6 years ago

sadly another one of my imports bites the dust at React 16 :( looks like its time to find another good react table ...

abdulrahman-khankan commented 6 years ago

@andrewlorenz you can add this to your package.json instead. "reactable": "github:abdulrahman-khankan/reactable" I will keep it there and in contact with npm support to publish it there as well.

andrewlorenz commented 6 years ago

hey, great offer thanks I'll take a look.

andrewlorenz commented 6 years ago

@abdulrahman-khankan I'm finding that in spite of adding the pointer to your repo as you suggested, that: a) npm install/update always tells me (i.e. even if I run it again and again):

+ reactable@0.14.1
updated 1 package in 17.533s

b) After running npm, there is no "reactable" folder in my node_modules c) When I try to run up my app, I get the error: Cannot find module 'reactable/lib/reactable'

abdulrahman-khankan commented 6 years ago

It's a bug with package-lock. Happens to me often, hopefully npm will reply soon and no need to link it to GitHub anymore.

You can delete package-lock and run npm install again and it should work fine. At least that's how I solve it.

andrewlorenz commented 6 years ago

funnily enough I've just come back on to say I've managed to fix it exactly by doing just that! (though I'm sure I'd already tried that before and didn't get the same result). Thanks for such a prompt reply though my friend !