felixakiragreen / react-kronos

A fast, intuitive, and elegant date and time picker for React.
https://felixakiragreen.github.io/react-kronos/
MIT License
90 stars 28 forks source link

Incompatibility with React 16.3.0 and up #75

Closed mikebcbc closed 5 years ago

mikebcbc commented 6 years ago

Invariant Violation: Element ref was specified as a string (kronos) but no owner was set.

When react-dom and react are past version 16.2.0, this package breaks. I believe this error is in reference to line 49 of src/styled-component.js. According the documentation, you can not use refs on function components. In version 16.3.0, a couple of new APIs handling this were introduced so I believe the error was just suppressed until then.

I imagine it's pretty simple to fix this and update the package - until then, react-kronos doesn't work with any version of react or react-dom past 16.2.0.

felixakiragreen commented 5 years ago

Thanks for bringing this up. I will try to get it updated soon. Been pretty busy working on other projects lately.

mikebcbc commented 5 years ago

@xenophilicibex Hey there! I just wanted to check in and see if this is still being updated?

felixakiragreen commented 5 years ago

My apologies @mikebcbc . I will try to get to it this week, but I would also welcome a PR to update it!

felixakiragreen commented 5 years ago

Updated!